Reading Multi Spectral Images

https://nbviewer.jupyter.org/github/thomasaarholt/hyperspy-demos/blob/master/2_SVD_and_BSS.ipynb

Multispectral Imagery

Images obtained with a ADC Lite - Tetracam's Lightweight ADC

I made pitures about:

Aluminum , Copper, Brass, Iron, Stainless Steel, Painted Iron

http://tetracam.com/Products-ADC_Lite.htm

MRobalinho - 01-06-2019 Version 8

Add Libraries

In [1]:
# Add libraries
import glob, os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from PIL import Image, ImageFilter, ImageOps
from openpyxl import load_workbook
In [2]:
# Clear all
os.system( 'cls' )

# Verify my current folder
currDir = os.path.dirname(os.path.realpath("__file__"))
mypath = currDir
print(currDir)  
C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook
In [3]:
# Path to the image files
folder = "imagedata06"

# Part name of file to filter files
end_file = ".tif"

# Upper End File
#end_file = end_file.upper()
path = currDir + "/" + folder + "/"
end_file
Out[3]:
'.tif'

Read images from folder

In [4]:
# Read files from folder
print(path)
print('-')
print(' ---- IMAGES ON THE FOLDER :', folder, '------- *', end_file)

list_of_images = list()  # save all images on folder for further processing 

for file in os.listdir(path):
    if file.endswith(end_file):
        print(os.path.join(file))
        list_of_images.append(file)   # save all images on folder for further processing 
print('-')        
C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/
-
 ---- IMAGES ON THE FOLDER : imagedata06 ------- * .tif
Aluminum_1.tif
Aluminum_2.tif
Aluminum_3.tif
Aluminum_4.tif
Aluminum_5.tif
Aluminum_6.tif
Brass_1.tif
Brass_2.tif
Brass_3.tif
Brass_4.tif
Brass_5.tif
Brass_6.tif
CopperWire_1.tif
CopperWire_2.tif
CopperWire_3.tif
CopperWire_4.tif
CopperWire_5.tif
CopperWire_6.tif
CopperWire_7.tif
CopperWire_8.tif
Copper_1.tif
Copper_2.tif
Copper_3.tif
Copper_4.tif
Iron_1.tif
Iron_2.tif
Iron_3.tif
Iron_4.tif
PaintedIron_1.tif
PaintedIron_2.tif
PaintedIron_3.tif
PaintedIron_4.tif
PaintedIron_5.tif
PaintedIron_6.tif
PaintedIron_7.tif
StainlessSteel_1.tif
StainlessSteel_2.tif
StainlessSteel_3.tif
StainlessSteel_4.tif
StainlessSteel_5.tif
StainlessSteel_6.tif
StainlessSteel_7.tif
StainlessSteel_8.tif
StainlessSteel_9.tif
-
In [5]:
# Create Data Frame with image information
df_image = []

Functions to the work

In [6]:
# Read image with PIL
from PIL import Image, ImageFilter, ImageOps
def read_pil_image(file1):
    #print('Reading PIL image:', file1)
    try:
        im_pil = Image.open(file1)
    except:
        print("-->Unable to load image",file1)
    return im_pil
In [7]:
# Read image with OPENCV
import cv2
def read_cv2_image(file1):
    #print('Reading CV image:',file1)
    try:
        im_cv = cv2.imread(file1)
    except:
        print("-->Unable to load image",file1)
    return im_cv
In [8]:
# Look from an chanel from then image

def channel(img, n):
    """Isolate the nth channel from the image.

       n = 0: red, 1: green, 2: blue
    """
    a = np.array(img)
    a[:,:,(n!=0, n!=1, n!=2)] *= 0
#   a[:,:,n] *= 0
#   print(Image.fromarray(a), 'Get Channel n: ', n)

    print('Get Channel n: ', n)
    return Image.fromarray(a)

# def to resize 
# Given parameters : image , number to divide (resize)
def imageResize(img, n):
    width, height = img.size 

    print('Original size:', width, '/', height, 'Resize:',n)
    
    newWidth = int(width / n)
    newHeight = int(height / n)
    img.resize((newWidth, newHeight), Image.ANTIALIAS)
    print('New size:', newWidth, '/', newHeight)
    return img
In [9]:
# Obtain main color from image
# https://convertingcolors.com/rgb-color-169_171_170.html
    
def get_main_color(path, file):
    #img = Image.open(path+file)
    file1 = path+file
    # Read image
    img = read_pil_image(file1)
    if img == None:
        print("-->Unable to load image",file1)
        
    colors = img.getcolors( 1024*1024) #put a higher value if there are many colors in your image
    print('Get main Color file:', file)
    max_occurence, most_present = 0, 0
    try:
        for c in colors:
            if c[0] > max_occurence:
                (max_occurence, most_present) = c
        return most_present
    except TypeError:
        raise Exception("Too many colors in the image")
In [10]:
#!/usr/bin/python

# Return one 24-bit color value 
def rgbToDecimal(x_rgb):
    r,g,b = rgbToRGB(x_rgb)
    rgb_dec = (r << 16) + (g << 8) + b
    #print('RGB Color:', x_rgb, '   Dec:', rgb_dec)
    return rgb_dec

# Convert 24-bit color value to RGB
def colorToRGB(c):
    r = c >> 16
    c -= r * 65536;
    g = c / 256
    c -= g * 256;
    b = c
    return [r, g, b]

def rgbToRGB(x_rgb):
    x_rgb = list(x_rgb)
    r = x_rgb[0]
    g = x_rgb[1]
    b = x_rgb[2]

    #print('rgbToRGB:',x_rgb, r,g,b)
    return r, g, b

def getRGBfromI(RGBint):
    blue =  RGBint & 255
    green = (RGBint >> 8) & 255
    red =   (RGBint >> 16) & 255
    return red, green, blue

def getIfromRGB(rgb):
    red = rgb[0]
    green = rgb[1]
    blue = rgb[2]
    #print('getIfromRGB:', red, green, blue)
    RGBint = (red<<16) + (green<<8) + blue
    return RGBint

# RGB to Hex Decimal
def rgb_to_hex(rgb):
    rgb_int = bytes(rgb).hex()
    rgb_dec = '#'+str(rgb_int)
    #print('RGB :',rgb, '  Hex Dec:', rgb_dec)
    return rgb_dec

# Test
#x_rgb = (254, 250, 255)
#rgb_hex = rgb_to_hex(x_rgb)
#rgb_dec = rgbToDecimal(x_rgb)
In [11]:
# https://github.com/conda-forge/webcolors-feedstock
# conda config --add channels conda-forge
# conda install webcolors
# It is possible to list all of the versions of webcolors available on your platform with:
#       conda search webcolors --channel conda-forge

# COLOR NAME
import webcolors
def get_color_name(rgb_x):
    min_colours = {}
    for key, name in webcolors.css21_hex_to_names.items():
        r_c, g_c, b_c = webcolors.hex_to_rgb(key)
        rd = (r_c - rgb_x[0]) ** 2
        gd = (g_c - rgb_x[1]) ** 2
        bd = (b_c - rgb_x[2]) ** 2
        min_colours[(rd + gd + bd)] = name
    print('Color name from RGB:',rgb_x,'  is :',min_colours[min(min_colours.keys())])
    return min_colours[min(min_colours.keys())]
In [12]:
# Get color name from RGB
# https://stackoverflow.com/questions/2453344/find-the-colour-name-from-a-hexadecimal-colour-code

colorof = {'#F0F8FF':"aliceblue",
'#FAEBD7':"antiquewhite",
'#00FFFF':"aqua",
'#7FFFD4':"aquamarine",
'#F0FFFF':"azure",
'#F5F5DC':"beige",
'#FFE4C4':"bisque",
'#000000':"black",
'#FFEBCD':"blanchedalmond",
'#0000FF':"blue",
'#8A2BE2':"blueviolet",
'#A52A2A':"brown",
'#DEB887':"burlywood",
'#5F9EA0':"cadetblue",
'#7FFF00':"chartreuse",
'#D2691E':"chocolate",
'#FF7F50':"coral",
'#6495ED':"cornflowerblue",
'#FFF8DC':"cornsilk",
'#DC143C':"crimson",
'#00FFFF':"cyan",
'#00008B':"darkblue",
'#008B8B':"darkcyan",
'#B8860B':"darkgoldenrod",
'#A9A9A9':"darkgray",
'#006400':"darkgreen",
'#BDB76B':"darkkhaki",
'#8B008B':"darkmagenta",
'#556B2F':"darkolivegreen",
'#FF8C00':"darkorange",
'#9932CC':"darkorchid",
'#8B0000':"darkred",
'#E9967A':"darksalmon",
'#8FBC8B':"darkseagreen",
'#483D8B':"darkslateblue",
'#2F4F4F':"darkslategray",
'#00CED1':"darkturquoise",
'#9400D3':"darkviolet",
'#FF1493':"deeppink",
'#00BFFF':"deepskyblue",
'#696969':"dimgray",
'#1E90FF':"dodgerblue",
'#B22222':"firebrick",
'#FFFAF0':"floralwhite",
'#228B22':"forestgreen",
'#FF00FF':"fuchsia",
'#DCDCDC':"gainsboro",
'#F8F8FF':"ghostwhite",
'#FFD700':"gold",
'#DAA520':"goldenrod",
'#808080':"gray",
'#008000':"green",
'#ADFF2F':"greenyellow",
'#F0FFF0':"honeydew",
'#FF69B4':"hotpink",
'#CD5C5C':"indianred",
'#4B0082':"indigo",
'#FFFFF0':"ivory",
'#F0E68C':"khaki",
'#E6E6FA':"lavender",
'#FFF0F5':"lavenderblush",
'#7CFC00':"lawngreen",
'#FFFACD':"lemonchiffon",
'#ADD8E6':"lightblue",
'#F08080':"lightcoral",
'#E0FFFF':"lightcyan",
'#FAFAD2':"lightgoldenrodyellow",
'#D3D3D3':"lightgray",
'#90EE90':"lightgreen",
'#FFB6C1':"lightpink",
'#FFA07A':"lightsalmon",
'#20B2AA':"lightseagreen",
'#87CEFA':"lightskyblue",
'#778899':"lightslategray",
'#B0C4DE':"lightsteelblue",
'#FFFFE0':"lightyellow",
'#00FF00':"lime",
'#32CD32':"limegreen",
'#FAF0E6':"linen",
'#FF00FF':"magenta",
'#800000':"maroon",
'#66CDAA':"mediumaquamarine",
'#0000CD':"mediumblue",
'#BA55D3':"mediumorchid",
'#9370DB':"mediumpurple",
'#3CB371':"mediumseagreen",
'#7B68EE':"mediumslateblue",
'#00FA9A':"mediumspringgreen",
'#48D1CC':"mediumturquoise",
'#C71585':"mediumvioletred",
'#191970':"midnightblue",
'#F5FFFA':"mintcream",
'#FFE4E1':"mistyrose",
'#FFE4B5':"moccasin",
'#FFDEAD':"navajowhite",
'#000080':"navy",
'#FDF5E6':"oldlace",
'#808000':"olive",
'#6B8E23':"olivedrab",
'#FFA500':"orange",
'#FF4500':"orangered",
'#DA70D6':"orchid",
'#EEE8AA':"palegoldenrod",
'#98FB98':"palegreen",
'#AFEEEE':"paleturquoise",
'#DB7093':"palevioletred",
'#FFEFD5':"papayawhip",
'#FFDAB9':"peachpuff",
'#CD853F':"peru",
'#FFC0CB':"pink",
'#DDA0DD':"plum",
'#B0E0E6':"powderblue",
'#800080':"purple",
'#FF0000':"red",
'#BC8F8F':"rosybrown",
'#4169E1':"royalblue",
'#8B4513':"saddlebrown",
'#FA8072':"salmon",
'#F4A460':"sandybrown",
'#2E8B57':"seagreen",
'#FFF5EE':"seashell",
'#A0522D':"sienna",
'#C0C0C0':"silver",
'#87CEEB':"skyblue",
'#6A5ACD':"slateblue",
'#708090':"slategray",
'#FFFAFA':"snow",
'#00FF7F':"springgreen",
'#4682B4':"steelblue",
'#D2B48C':"tan",
'#008080':"teal",
'#D8BFD8':"thistle",
'#FF6347':"tomato",
'#40E0D0':"turquoise",
'#EE82EE':"violet",
'#F5DEB3':"wheat",
'#FFFFFF':"white",
'#F5F5F5':"whitesmoke",
'#FFFF00':"yellow",
'#9ACD32':"yellowgreen"}


def get_rgb_color_name(rgb):
    
    hex_from_rgb = rgb_to_hex(rgb)  # transform RGB into hexadecimal
    hx = hex_from_rgb[1:8]
    #print(hx)
    # if color is found in dict
    if colorof.get(hx):return colorof[hx]

    # else return its closest available color
    m = 16777215
    k = '000000'
    for key in colorof.keys():
        key_color = key[1:8]
        #print(key_color)
        a = int(hx[:2],16)-int(key_color[:2],16)
        b = int(hx[2:4],16)-int(key_color[2:4],16)
        c = int(hx[4:],16)-int(key_color[4:],16)

        v = a*a+b*b+c*c # simple measure for distance between colors

        # v = (r1 - r2)^2 + (g1 - g2)^2 + (b1 - b2)^2

        if v <= m:
            m = v
            k = key

    return colorof[k], hex_from_rgb

# Test
#rgb_1 = (216, 220, 223)
#cname, hexdc = get_rgb_color_name(rgb_1)
#print('Found:',    cname, '  Hex:', hexdc)     # found in dict
In [13]:
# Increase the contrast image
# im - image
# xvalue = contrast value
# https://pillow.readthedocs.io/en/4.0.x/reference/ImageEnhance.html
from PIL import ImageEnhance
# Path + file name + numeric value to enhancement

def contrast(path, xfile, xvalue):
    print('   Enhance image:', xfile, '  Value:', xvalue)
    file1 = path + xfile
    # Read Image
    im = read_pil_image(file1)
    if im == None:
        print("-->Unable to load image",file1)
    
    enh = ImageEnhance.Contrast(im)
    # enh.enhance(1.0).show("30% more contrast")
    x_enh = enh.enhance(xvalue)
     # Create name file masked
    f2_file = 'Enh_' + xfile
    print('   Save enhanced file :', f2_file)
    x_enh.save(f2_file)  # save enhanced file
    return x_enh, f2_file
In [14]:
# Return RGB separately
def return_rgb_from_RGB(rgb):
    p_rgb = list(rgb)
    red   = p_rgb[0]
    green = p_rgb[1]
    blue  = p_rgb[2]
    return red, green, blue
In [15]:
# Return distance from 2 colors

# http://hanzratech.in/2015/01/16/color-difference-between-2-colors-using-python.html
# https://python-colormath.readthedocs.io/en/latest/delta_e.html#delta-e-cie-2000

from colormath.color_objects import sRGBColor, LabColor
from colormath.color_conversions import convert_color
from colormath.color_diff import delta_e_cie2000

def delta_2_colors(rgb_1, rgb_2):
    #print('   Delta colors: ', rgb_1, rgb_2)
    #---- first color
    xr, xg, xb = return_rgb_from_RGB(rgb_1)
    # Red Color
    color1_rgb = sRGBColor(xr, xg, xb)

    #--- other color
    rgb_1 = rgb_2
    xr, xg, xb = return_rgb_from_RGB(rgb_1)
    # Blue Color
    color2_rgb = sRGBColor(xr, xg, xb)

    # Convert from RGB to Lab Color Space
    color1_lab = convert_color(color1_rgb, LabColor)

    # Convert from RGB to Lab Color Space
    color2_lab = convert_color(color2_rgb, LabColor)

    # Find the color difference
    delta_e = delta_e_cie2000(color1_lab, color2_lab)

    #print("      The difference between the 2 color = ", delta_e)
    return delta_e
In [16]:
# Remove Background - Put red background
#https://stackoverflow.com/questions/29313667/how-do-i-remove-the-background-from-this-kind-of-image
    
import cv2
import numpy as np

def red_background(path, xfile):
    print('   Red background for image:', xfile)
    #== Parameters =======================================================================
    BLUR = 21
    CANNY_THRESH_1 = 10
    CANNY_THRESH_2 = 100
    MASK_DILATE_ITER = 10
    MASK_ERODE_ITER = 10
    MASK_COLOR = (0.0,0.0,1.0) # In BGR format

    #== Processing =======================================================================
    file1 = path + xfile
    #-- Read image -----------------------------------------------------------------------
    #img = cv2.imread(file1)
    # Read image
    img = read_cv2_image(file1)
    if img.any() == None:
        print("-->Unable to load image",file1)
    
    # Create GRAY Image
    gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)

    #-- Edge detection -------------------------------------------------------------------
    edges = cv2.Canny(gray, CANNY_THRESH_1, CANNY_THRESH_2)
    edges = cv2.dilate(edges, None)
    edges = cv2.erode(edges, None)

    #-- Find contours in edges, sort by area ---------------------------------------------
    contour_info = []
    _, contours, _ = cv2.findContours(edges, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE)
    for c in contours:
        contour_info.append((
            c,
            cv2.isContourConvex(c),
            cv2.contourArea(c),
        ))
    contour_info = sorted(contour_info, key=lambda c: c[2], reverse=True)
    max_contour = contour_info[0]

    #-- Create empty mask, draw filled polygon on it corresponding to largest contour ----
    # Mask is black, polygon is white
    mask = np.zeros(edges.shape)
    for c in contour_info:
        cv2.fillConvexPoly(mask, c[0], (255))

    #-- Smooth mask, then blur it
    mask = cv2.dilate(mask, None, iterations=MASK_DILATE_ITER)
    mask = cv2.erode(mask, None, iterations=MASK_ERODE_ITER)
    mask = cv2.GaussianBlur(mask, (BLUR, BLUR), 0)
    mask_stack = np.dstack([mask]*3)    # Create 3-channel alpha mask

    #-- Blend masked img into MASK_COLOR background
    mask_stack  = mask_stack.astype('float32') / 255.0         
    img         = img.astype('float32') / 255.0    
    masked = (mask_stack * img) + ((1-mask_stack) * MASK_COLOR)  
    masked = (masked * 255).astype('uint8')                    
    
    cv2.imwrite(path+"MASK_"+xfile,masked)
    
    # Create name file masked
    f2_file = 'Mask_'+ xfile
    file2 = path + f2_file
    
    # Write masked image on disk
    print('   Save masked image with red background:', f2_file)
    cv2.imwrite(file2, masked)           # Save
    # Return name file masked and image masked
    return f2_file, masked

# Test
'''
xfile = 'Brass_001.tif'
f2_file, masked = red_background(path,xfile)
%matplotlib inline
plt.imshow(masked)
plt.title('Remove image background:'+xfile,fontsize=20)
plt.show()
'''
Out[16]:
"\nxfile = 'Brass_001.tif'\nf2_file, masked = red_background(path,xfile)\n%matplotlib inline\nplt.imshow(masked)\nplt.title('Remove image background:'+xfile,fontsize=20)\nplt.show()\n"
In [17]:
# https://convertingcolors.com/rgb-color-169_171_170.html

# return most_present RGB, RGB, color name, list RGB colors without RED, list RGB colors without back

import collections

def get_main_color_without_red_and_floor(path, f2_file):
    print('    Main color from image:', f2_file)
    file1 = path + f2_file
    
    # Read image
    img = read_pil_image(file1)
    if img == None:
        print("-->Unable to load image",file1)
        
    colors = img.getcolors( 1024*1024) #put a higher value if there are many colors in your image
    #-----
    # Create list with colors without Background red color (near Background color)
    list_non_back = list()
    list_dec_back = list()   # List from decimal colors to list_non_back
    #
    print('...  List without excluded colors')
    # Convert list to decimal color
    for color in colors:
        # Diference between colors
       # print(color[1])
        rgb = color[1]

        excluded_rgb = False
        
        #Verify color name
        xt_color_name , hexdc = get_rgb_color_name(rgb)
        
        # Exclusion for some colors (Red Backgroud, Black foor, etc)
        if "red"   in xt_color_name: 
             excluded_rgb = True
        if "black" in xt_color_name:        
             excluded_rgb = True
        if "white" in xt_color_name:
            excluded_rgb = True
        if "cream" in xt_color_name:
            excluded_rgb = True             
        
        # Force Only for non-tif files we do not delete anything
        if file.endswith('.tif'):
            excluded_rgb = False
    
        if  excluded_rgb == True:     # Exclude COLOR  
            #print("Cor excluida", rgb, xt_color_name )
            excluded_rgb = True
        else:
            # OK COLOR - Save color in the list of correct colors (list_non_back)
            #print("Cor OK", rgb, xt_color_name )
            list_non_back.append(rgb)
            # Decimal color
            rgb_dec    = rgbToDecimal(rgb)
            list_dec_back.append(rgb_dec)   
  
    #-----
    print('Count ocurrencies for color')
    most_present = 0

    # Most common color in the list - list_non_back
    x = collections.Counter(list_non_back)
    print('      4 Most common colors:', x.most_common(4))  # Five most common colors
    most_present = x.most_common(1)
    xrgb = list_non_back[0] # common color
    
    # ----- color name --
    #xt_color_name = get_color_name(xrgb)
    print('      Read color name:', xrgb)  # Color name from RGB
    xt_color_name , hexdc = get_rgb_color_name(xrgb)
    print('      Main Color file:', f2_file, ' RGB:', most_present, xrgb, ' Color name:', xt_color_name,' Hex:',hexdc)
    
    return most_present, xrgb, xt_color_name, list_non_back, list_dec_back

# Test
#xfile = 'Copper_001.tif'
#most_present, xrgb, xt_color_name, list_non_back, \
#     list_dec_back = get_main_color_without_red_and_floor(path, xfile)
In [18]:
# https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_histograms/py_histogram_begins/py_histogram_begins.html
# Print histogram using Opencv
import cv2
import numpy as np
from matplotlib import pyplot as plt

def print_cv_hist(path, xfile):
    file1 = path + xfile
    print('Cv2 Hist from file:', file1)
    
    # Read image
    img_cv = read_cv2_image(file1)
    if img_cv.any() == None:
        print("-->Unable to load image",file1)

    # create a mask
    mask = np.zeros(img_cv.shape[:2], np.uint8)

    # define area to extract image from original
    #    Left:height , right:length
    mask[200:1400, 200:1800] = 255
    masked_img = cv2.bitwise_and(img_cv, img_cv ,mask = mask)

    # Calculate histogram with mask and without mask
    # Check third argument for mask
    hist_full = cv2.calcHist([img_cv],[0],None,[256],[0,256])
    hist_mask = cv2.calcHist([img_cv],[0],mask,[256],[0,256])

    plt.figure(figsize=(18,5))

    plt.subplot(141), plt.imshow(img_cv, 'gray')
    plt.title("Original")

    plt.subplot(142), plt.imshow(mask,'gray')
    plt.title('Mask')

    plt.subplot(143), plt.imshow(masked_img, 'gray')
    plt.title('Masked image')


    ax=plt.subplot(144), plt.plot(hist_full), plt.plot(hist_mask)
    ax = plt.gca()
    ax.grid(True)
    plt.title('Histogram')
    plt.xlim([0,256])

    plt.suptitle('IMAGE HISTOGRAM',fontsize=18)
    plt.xlabel('Image:'+xfile,fontsize=18)
    plt.ylabel('All chanels',fontsize=10)
    plt.savefig(path+'Hist_cv2_'+xfile)   # Save Histograme Figure
    plt.show()
    return

# Test
#xfile = 'Copper_001.tif'
#print_cv_hist(path, xfile)
In [19]:
# https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_histograms/py_histogram_begins/py_histogram_begins.html
# Print histogram using Opencv and matplotlib

import cv2
import numpy as np
from matplotlib import pyplot as plt

def print_matplot_hist(path, xfile):
    file1 = path + xfile   
    print('Matplot Hist from file:', file1)
    
    # Read image
    img_mp = read_cv2_image(file1)
    if img_mp.any() == None:
        print("-->Unable to load image",file1)
    
    color = ('b','g','r')
    ax = plt.figure(figsize=(10,5))
    ax = plt.gca()
    ax.grid(True)
    
    for i,col in enumerate(color):
        histr = cv2.calcHist([img_mp],[i],None,[256],[0,256])
        plt.plot(histr,color = col, label='Band '+col.upper())
        plt.xlim([0,256])

    plt.title('Histogram of the image',fontsize=20)
    plt.xlabel('Image:'+xfile,fontsize=18)
    plt.ylabel('All chanels',fontsize=18)
    plt.legend(bbox_to_anchor=(.90,0.85),bbox_transform=plt.gcf().transFigure)
    plt.savefig(path+'Hist_'+xfile)   # Save Histograme Figure
    plt.show()   
        
    return

# Test
#xfile = 'Copper_1.tif'
#print_matplot_hist(path, xfile)
In [20]:
# Max and Min value from Histogram and each position
#l = np.array(hist_full).tolist()  - Transform array in a list

import cv2
import numpy as np
from matplotlib import pyplot as plt

def histogram_max_min(path, xfile):

    file1 = path+xfile
    print('Histogram analisys:', file1)
    
    # Read image
    imgh = read_cv2_image(file1)
    if imgh.any() == None:
        print("-->Unable to load image",file1)

    # Calculate histogram without mask
    hist_full = cv2.calcHist([imgh],[0],None,[256],[0,256])
 
    # Transform array in a list
    hist_list = np.array(hist_full).tolist()

    # Valor maximo e minimo do Histograma e sua posição
    val_max  = max(hist_list)
    xval_max = int(val_max[0])
 
    val_avg  =  max(hist_list) 
    xval_avg = int(val_avg[0]) / len(hist_list)
    xval_avg = int(xval_avg)
    
    val_min  = min(hist_list)
    xval_min = int(val_min[0])
    
    idx_max = hist_list.index(val_max)
    idx_min = hist_list.index(val_min)
    
    #print("Valor Max Histograma:", xval_max, '  Posição do valor Max:', idx_max)
    #print("Valor Min Histograma:", xval_min, '  Posição do valor Min:', idx_min)
    #print("Valor Avg Histograma:", xval_avg)
  
    return xval_max, idx_max, xval_min, idx_min

# Test
#xfile = 'Copper_001.tif'
#_,_,_,_ = histogram_max_min(path, xfile)
 
In [21]:
# Read image folder
import glob, os
def get_image_folder(xfile1):
    # Path to the image files
    path = currDir + "/" + folder + "/"
    # File
    file1 = path + xfile1
    print(file1)
    
    return file1
In [22]:
# Obtain percentage of channels R,G,B
import matplotlib.image as mpimg
def percent_rgb(path, xfile):
    print('    RGB percent from image:', xfile)
    emptyBlue = []
    emptyGreen= []
    emptyRed= []
    
    all_path = path + xfile
    # Read file
    img = mpimg.imread(all_path)
    imgplot = plt.imshow(img)
    # Mean of the array of each chanel
    RGBtuple = np.array(img).mean(axis=(0,1))

    averageRed = RGBtuple[0]
    averageGreen = RGBtuple[1]
    averageBlue = RGBtuple[2]

    percentageGreen = averageGreen/(averageRed+averageGreen+averageBlue) * 100
    percentageBlue = averageBlue/(averageRed+averageGreen+averageBlue) * 100
    percentageRed = averageRed/(averageRed+averageGreen+averageBlue) * 100

    emptyBlue+=[percentageBlue]
    emptyGreen+=[percentageGreen]
    emptyRed+=[percentageRed]
    print('     ------------------------------')
    print('     Percent Red',percentageRed)
    print('     Percent Green',percentageGreen)
    print('     Percent Blue',percentageBlue)
    print('     ------------------------------')
    return percentageRed, percentageGreen, percentageBlue
In [23]:
# Print all the informations from image, and create a pandas data frame with the relevant information

def print_file(path, xfile):
    print('------------------------------------------------------------------------')   
    file1 = path + xfile
    
    # Read image
    tif_f1 = read_pil_image(file1)
    if tif_f1 == None:
        print("-->Unable to load image",file1)

    print('Inf.File:',xfile)

    # Transform Image to array
    aArray = np.array(tif_f1)
    # Array sum  
    xsum = aArray.sum() / 1000000
    
    # Get channel 0
    x0_channel = channel(tif_f1, 0)
    aArray = np.array(x0_channel)
    xsum_0 = aArray.sum() / 1000000  

    # Get channel 1
    x1_channel = channel(tif_f1, 1)
    aArray = np.array(x1_channel)
    xsum_1 = aArray.sum() / 1000000  

    # Get channel 2
    x2_channel = channel(tif_f1, 2)
    aArray = np.array(x2_channel)
    xsum_2 = aArray.sum() / 1000000  

    # Histogram from image
    aHist = tif_f1.histogram()
    hsum = sum(aHist) / 100000

    # Histogram channel 0
    aHist_0 = x0_channel.histogram()
    hsum_0 = sum(aHist_0) / 100000

    # Histogram channel 1
    aHist_1 = x1_channel.histogram()
    hsum_1 = sum(aHist_1) / 100000

    # Histogram chanel 0
    aHist_2 = x2_channel.histogram()
    hsum_2 = sum(aHist_2) / 100000

    # number elements on list
    nlist = len(aHist)
    
    # Max and Min from Histogram
    xval_max, idx_max, xval_min, idx_min = histogram_max_min(path, xfile)
    
    # Percentage RGB
    perc_R, perc_G, perc_B = percent_rgb(path, xfile)

    # Get color
    # Enhancement Contrast color for better definition
    # f1_file has the file name saved enhanced  
    xvalue = 2.0  
    print('Enhancement color:', xfile, '  Value:',xvalue)  
    x_enh, f1_file = contrast(path, xfile, xvalue)

    # Remove Background - Put red background
    # f2_file has the file name saved masked
    
    # Only red Background for NON tif files
    #xend_file = file.endswith('*.TIF').upper()
    if file.endswith('*.TIF'):
        f2_file = f1_file
        img_masked = tif_f1
    else:    
        file1 = path+f1_file  
        print('Red background:', path, f1_file)   
        f2_file, img_masked = red_background(path, f1_file)

    # Get Main Color - 
    print('Most common color:', path, f2_file)  
    
    # most present color, RGB from most present color:
    # color name , Hex from rgb , list colors withour red, list colors without back, decimal list colors without back
    most_present, xrgb, xt_color_name, list_non_back,list_dec_back = get_main_color_without_red_and_floor(path, f2_file) 
    
    # HEX fom most present color
    hex_color  = rgb_to_hex(xrgb)
    
    # Decimal from most present color
    rgb_dec    = rgbToDecimal(xrgb)
    #----
    # Get Extrems of the image
    extr_a = tif_f1.getextrema() 
    # Transform tuple in a list    
    extr_b = [x for sets in extr_a for x in sets]
    # Sum the list  
    sum_list = sum(extr_b) 
    med_extr  = sum_list / len(extr_b)
    #print('List Extremes:',extr_a,'Sum:',sum_list,'Len:', len(extr_b), 'Med:',med_extr)


    # Obtain name file without extension 
    sample_name = os.path.basename(xfile).split('_')[0]

    # Print information  
    print(sample_name,' Size:',tif_f1.size, ' Format:',tif_f1.format, ' Mode:', tif_f1.mode)
    print('          Sum array:',xsum, ' Sum Ch 0:', xsum_0, ' Sum Ch 1:', xsum_1, ' Sum Ch 2:', xsum_2)      
    print('          Histog   :',hsum ,'  N.List elem:', nlist, ' Max:', xval_max, 'Idx Max:', idx_max, '  Min:', xval_min, 'Idx Min:', idx_min )
    print('          Color    :',xt_color_name,'   RGB   :',xrgb, '   Hex color:', hex_color,'  Dec Color:',rgb_dec)
    print('          Extremes :',extr_a, 'Med Extremes:',med_extr)
    print('          Percentage R:', perc_R,'  Percentage G:', perc_B, '  Percentage B:', perc_B)

    # insert information in a Pandas Data Frame
    df_image.append((folder, xfile, sample_name, tif_f1.size, tif_f1.format, tif_f1.mode , 
                       xsum, xsum_0, xsum_1, xsum_2, hsum, nlist, xt_color_name, xrgb, hex_color, 
                       rgb_dec, med_extr, xval_max, idx_max, xval_min, idx_min,
                       perc_R, perc_G, perc_B))
    
    return most_present, xrgb, xt_color_name, list_non_back, list_dec_back
 

Starting image analysis

In [24]:
# Timer
import datetime
master_time_start = datetime.datetime.now() # global timer start
In [25]:
# Create Data Frame with image information
df_image = []

xend_file = "*" + end_file
# change work to folder path
os.chdir(path)
print('Analysing Images from:',path, xend_file)

for file in glob.glob(xend_file):
    file_time_start = datetime.datetime.now() # timer start
    list_dec_back = list() # List with decimal colors in the image
    print(file)
    most_present, xrgb, xt_color_name, list_non_back, list_dec_back = print_file(path,file)
    file_time_end = datetime.datetime.now()
    elapsed = file_time_end - file_time_start
    print('File Start:', file_time_start, ' Finish:', file_time_end, '  File Time:',elapsed) # timer end
    
master_time_end = datetime.datetime.now() # global timer end
elapsed = master_time_end - master_time_start
print('Process Start:', master_time_start, ' Finish:', master_time_end, '  Global Time:',elapsed)
Analysing Images from: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ *.tif
Aluminum_1.tif
------------------------------------------------------------------------
Inf.File: Aluminum_1.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_1.tif
    RGB percent from image: Aluminum_1.tif
     ------------------------------
     Percent Red 33.57960394466849
     Percent Green 33.57960394466849
     Percent Blue 32.840792110663024
     ------------------------------
Enhancement color: Aluminum_1.tif   Value: 2.0
   Enhance image: Aluminum_1.tif   Value: 2.0
   Save enhanced file : Enh_Aluminum_1.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Aluminum_1.tif
   Red background for image: Enh_Aluminum_1.tif
   Save masked image with red background: Mask_Enh_Aluminum_1.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Aluminum_1.tif
    Main color from image: Mask_Enh_Aluminum_1.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((243, 229, 223), 1), ((239, 229, 223), 1), ((237, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Aluminum_1.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Aluminum  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 658.137536  Sum Ch 0: 220.999978  Sum Ch 1: 220.999978  Sum Ch 2: 216.13758
          Histog   : 94.37184   N.List elem: 768  Max: 237292 Idx Max: 11   Min: 543 Idx Min: 109
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.57960394466849   Percentage G: 32.840792110663024   Percentage B: 32.840792110663024
File Start: 2019-06-01 19:23:49.323230  Finish: 2019-06-01 19:24:01.932546   File Time: 0:00:12.609316
Aluminum_2.tif
------------------------------------------------------------------------
Inf.File: Aluminum_2.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_2.tif
    RGB percent from image: Aluminum_2.tif
     ------------------------------
     Percent Red 33.57823383501651
     Percent Green 33.57823383501651
     Percent Blue 32.84353232996698
     ------------------------------
Enhancement color: Aluminum_2.tif   Value: 2.0
   Enhance image: Aluminum_2.tif   Value: 2.0
   Save enhanced file : Enh_Aluminum_2.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Aluminum_2.tif
   Red background for image: Enh_Aluminum_2.tif
   Save masked image with red background: Mask_Enh_Aluminum_2.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Aluminum_2.tif
    Main color from image: Mask_Enh_Aluminum_2.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((255, 229, 223), 1), ((247, 229, 223), 1), ((243, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Aluminum_2.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Aluminum  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 693.024169  Sum Ch 0: 232.705276  Sum Ch 1: 232.705276  Sum Ch 2: 227.613617
          Histog   : 94.37184   N.List elem: 768  Max: 280312 Idx Max: 252   Min: 648 Idx Min: 129
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.57823383501651   Percentage G: 32.84353232996698   Percentage B: 32.84353232996698
File Start: 2019-06-01 19:24:01.932546  Finish: 2019-06-01 19:24:15.082001   File Time: 0:00:13.149455
Aluminum_3.tif
------------------------------------------------------------------------
Inf.File: Aluminum_3.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_3.tif
    RGB percent from image: Aluminum_3.tif
     ------------------------------
     Percent Red 33.563387602119285
     Percent Green 33.563387602119285
     Percent Blue 32.873224795761416
     ------------------------------
Enhancement color: Aluminum_3.tif   Value: 2.0
   Enhance image: Aluminum_3.tif   Value: 2.0
   Save enhanced file : Enh_Aluminum_3.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Aluminum_3.tif
   Red background for image: Enh_Aluminum_3.tif
   Save masked image with red background: Mask_Enh_Aluminum_3.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Aluminum_3.tif
    Main color from image: Mask_Enh_Aluminum_3.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((254, 229, 223), 1), ((250, 229, 223), 1), ((248, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Aluminum_3.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Aluminum  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 696.532319  Sum Ch 0: 233.779842  Sum Ch 1: 233.779842  Sum Ch 2: 228.972635
          Histog   : 94.37184   N.List elem: 768  Max: 248402 Idx Max: 8   Min: 819 Idx Min: 94
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.563387602119285   Percentage G: 32.873224795761416   Percentage B: 32.873224795761416
File Start: 2019-06-01 19:24:15.082497  Finish: 2019-06-01 19:24:41.015366   File Time: 0:00:25.932869
Aluminum_4.tif
------------------------------------------------------------------------
Inf.File: Aluminum_4.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_4.tif
    RGB percent from image: Aluminum_4.tif
     ------------------------------
     Percent Red 33.57960394466849
     Percent Green 33.57960394466849
     Percent Blue 32.840792110663024
     ------------------------------
Enhancement color: Aluminum_4.tif   Value: 2.0
   Enhance image: Aluminum_4.tif   Value: 2.0
   Save enhanced file : Enh_Aluminum_4.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Aluminum_4.tif
   Red background for image: Enh_Aluminum_4.tif
   Save masked image with red background: Mask_Enh_Aluminum_4.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Aluminum_4.tif
    Main color from image: Mask_Enh_Aluminum_4.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((243, 229, 223), 1), ((239, 229, 223), 1), ((237, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Aluminum_4.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Aluminum  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 658.137536  Sum Ch 0: 220.999978  Sum Ch 1: 220.999978  Sum Ch 2: 216.13758
          Histog   : 94.37184   N.List elem: 768  Max: 237292 Idx Max: 11   Min: 543 Idx Min: 109
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.57960394466849   Percentage G: 32.840792110663024   Percentage B: 32.840792110663024
File Start: 2019-06-01 19:24:41.015366  Finish: 2019-06-01 19:25:05.415098   File Time: 0:00:24.399732
Aluminum_5.tif
------------------------------------------------------------------------
Inf.File: Aluminum_5.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_5.tif
    RGB percent from image: Aluminum_5.tif
     ------------------------------
     Percent Red 33.57823383501651
     Percent Green 33.57823383501651
     Percent Blue 32.84353232996698
     ------------------------------
Enhancement color: Aluminum_5.tif   Value: 2.0
   Enhance image: Aluminum_5.tif   Value: 2.0
   Save enhanced file : Enh_Aluminum_5.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Aluminum_5.tif
   Red background for image: Enh_Aluminum_5.tif
   Save masked image with red background: Mask_Enh_Aluminum_5.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Aluminum_5.tif
    Main color from image: Mask_Enh_Aluminum_5.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((255, 229, 223), 1), ((247, 229, 223), 1), ((243, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Aluminum_5.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Aluminum  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 693.024169  Sum Ch 0: 232.705276  Sum Ch 1: 232.705276  Sum Ch 2: 227.613617
          Histog   : 94.37184   N.List elem: 768  Max: 280312 Idx Max: 252   Min: 648 Idx Min: 129
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.57823383501651   Percentage G: 32.84353232996698   Percentage B: 32.84353232996698
File Start: 2019-06-01 19:25:05.415602  Finish: 2019-06-01 19:25:24.494238   File Time: 0:00:19.078636
Aluminum_6.tif
------------------------------------------------------------------------
Inf.File: Aluminum_6.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_6.tif
    RGB percent from image: Aluminum_6.tif
     ------------------------------
     Percent Red 33.563387602119285
     Percent Green 33.563387602119285
     Percent Blue 32.873224795761416
     ------------------------------
Enhancement color: Aluminum_6.tif   Value: 2.0
   Enhance image: Aluminum_6.tif   Value: 2.0
   Save enhanced file : Enh_Aluminum_6.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Aluminum_6.tif
   Red background for image: Enh_Aluminum_6.tif
   Save masked image with red background: Mask_Enh_Aluminum_6.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Aluminum_6.tif
    Main color from image: Mask_Enh_Aluminum_6.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((254, 229, 223), 1), ((250, 229, 223), 1), ((248, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Aluminum_6.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Aluminum  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 696.532319  Sum Ch 0: 233.779842  Sum Ch 1: 233.779842  Sum Ch 2: 228.972635
          Histog   : 94.37184   N.List elem: 768  Max: 248402 Idx Max: 8   Min: 819 Idx Min: 94
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.563387602119285   Percentage G: 32.873224795761416   Percentage B: 32.873224795761416
File Start: 2019-06-01 19:25:24.494736  Finish: 2019-06-01 19:25:42.008856   File Time: 0:00:17.514120
Brass_1.tif
------------------------------------------------------------------------
Inf.File: Brass_1.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_1.tif
    RGB percent from image: Brass_1.tif
     ------------------------------
     Percent Red 33.63006225345552
     Percent Green 33.63006225345552
     Percent Blue 32.73987549308895
     ------------------------------
Enhancement color: Brass_1.tif   Value: 2.0
   Enhance image: Brass_1.tif   Value: 2.0
   Save enhanced file : Enh_Brass_1.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Brass_1.tif
   Red background for image: Enh_Brass_1.tif
   Save masked image with red background: Mask_Enh_Brass_1.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Brass_1.tif
    Main color from image: Mask_Enh_Brass_1.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((251, 229, 223), 1), ((245, 229, 223), 1), ((237, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Brass_1.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 562.098115  Sum Ch 0: 189.033946  Sum Ch 1: 189.033946  Sum Ch 2: 184.030223
          Histog   : 94.37184   N.List elem: 768  Max: 217593 Idx Max: 252   Min: 249 Idx Min: 0
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.63006225345552   Percentage G: 32.73987549308895   Percentage B: 32.73987549308895
File Start: 2019-06-01 19:25:42.009352  Finish: 2019-06-01 19:25:55.442238   File Time: 0:00:13.432886
Brass_2.tif
------------------------------------------------------------------------
Inf.File: Brass_2.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_2.tif
    RGB percent from image: Brass_2.tif
     ------------------------------
     Percent Red 33.677561630800604
     Percent Green 33.677561630800604
     Percent Blue 32.6448767383988
     ------------------------------
Enhancement color: Brass_2.tif   Value: 2.0
   Enhance image: Brass_2.tif   Value: 2.0
   Save enhanced file : Enh_Brass_2.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Brass_2.tif
   Red background for image: Enh_Brass_2.tif
   Save masked image with red background: Mask_Enh_Brass_2.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Brass_2.tif
    Main color from image: Mask_Enh_Brass_2.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((249, 229, 223), 1), ((247, 229, 223), 1), ((245, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Brass_2.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 449.396523  Sum Ch 0: 151.345791  Sum Ch 1: 151.345791  Sum Ch 2: 146.704941
          Histog   : 94.37184   N.List elem: 768  Max: 179424 Idx Max: 19   Min: 252 Idx Min: 0
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.677561630800604   Percentage G: 32.6448767383988   Percentage B: 32.6448767383988
File Start: 2019-06-01 19:25:55.442737  Finish: 2019-06-01 19:26:08.400309   File Time: 0:00:12.957572
Brass_3.tif
------------------------------------------------------------------------
Inf.File: Brass_3.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_3.tif
    RGB percent from image: Brass_3.tif
     ------------------------------
     Percent Red 33.70125013816265
     Percent Green 33.70125013816265
     Percent Blue 32.597499723674694
     ------------------------------
Enhancement color: Brass_3.tif   Value: 2.0
   Enhance image: Brass_3.tif   Value: 2.0
   Save enhanced file : Enh_Brass_3.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Brass_3.tif
   Red background for image: Enh_Brass_3.tif
   Save masked image with red background: Mask_Enh_Brass_3.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Brass_3.tif
    Main color from image: Mask_Enh_Brass_3.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((254, 229, 223), 1), ((248, 229, 223), 1), ((242, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Brass_3.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 469.763357  Sum Ch 0: 158.316124  Sum Ch 1: 158.316124  Sum Ch 2: 153.131109
          Histog   : 94.37184   N.List elem: 768  Max: 201117 Idx Max: 14   Min: 314 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.70125013816265   Percentage G: 32.597499723674694   Percentage B: 32.597499723674694
File Start: 2019-06-01 19:26:08.400309  Finish: 2019-06-01 19:26:20.148465   File Time: 0:00:11.748156
Brass_4.tif
------------------------------------------------------------------------
Inf.File: Brass_4.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_4.tif
    RGB percent from image: Brass_4.tif
     ------------------------------
     Percent Red 33.63006225345552
     Percent Green 33.63006225345552
     Percent Blue 32.73987549308895
     ------------------------------
Enhancement color: Brass_4.tif   Value: 2.0
   Enhance image: Brass_4.tif   Value: 2.0
   Save enhanced file : Enh_Brass_4.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Brass_4.tif
   Red background for image: Enh_Brass_4.tif
   Save masked image with red background: Mask_Enh_Brass_4.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Brass_4.tif
    Main color from image: Mask_Enh_Brass_4.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((251, 229, 223), 1), ((245, 229, 223), 1), ((237, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Brass_4.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 562.098115  Sum Ch 0: 189.033946  Sum Ch 1: 189.033946  Sum Ch 2: 184.030223
          Histog   : 94.37184   N.List elem: 768  Max: 217593 Idx Max: 252   Min: 249 Idx Min: 0
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.63006225345552   Percentage G: 32.73987549308895   Percentage B: 32.73987549308895
File Start: 2019-06-01 19:26:20.148465  Finish: 2019-06-01 19:26:33.026661   File Time: 0:00:12.878196
Brass_5.tif
------------------------------------------------------------------------
Inf.File: Brass_5.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_5.tif
    RGB percent from image: Brass_5.tif
     ------------------------------
     Percent Red 33.677561630800604
     Percent Green 33.677561630800604
     Percent Blue 32.6448767383988
     ------------------------------
Enhancement color: Brass_5.tif   Value: 2.0
   Enhance image: Brass_5.tif   Value: 2.0
   Save enhanced file : Enh_Brass_5.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Brass_5.tif
   Red background for image: Enh_Brass_5.tif
   Save masked image with red background: Mask_Enh_Brass_5.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Brass_5.tif
    Main color from image: Mask_Enh_Brass_5.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((249, 229, 223), 1), ((247, 229, 223), 1), ((245, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Brass_5.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 449.396523  Sum Ch 0: 151.345791  Sum Ch 1: 151.345791  Sum Ch 2: 146.704941
          Histog   : 94.37184   N.List elem: 768  Max: 179424 Idx Max: 19   Min: 252 Idx Min: 0
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.677561630800604   Percentage G: 32.6448767383988   Percentage B: 32.6448767383988
File Start: 2019-06-01 19:26:33.026661  Finish: 2019-06-01 19:26:45.942219   File Time: 0:00:12.915558
Brass_6.tif
------------------------------------------------------------------------
Inf.File: Brass_6.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_6.tif
    RGB percent from image: Brass_6.tif
     ------------------------------
     Percent Red 33.70125013816265
     Percent Green 33.70125013816265
     Percent Blue 32.597499723674694
     ------------------------------
Enhancement color: Brass_6.tif   Value: 2.0
   Enhance image: Brass_6.tif   Value: 2.0
   Save enhanced file : Enh_Brass_6.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Brass_6.tif
   Red background for image: Enh_Brass_6.tif
   Save masked image with red background: Mask_Enh_Brass_6.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Brass_6.tif
    Main color from image: Mask_Enh_Brass_6.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((254, 229, 223), 1), ((248, 229, 223), 1), ((242, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Brass_6.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 469.763357  Sum Ch 0: 158.316124  Sum Ch 1: 158.316124  Sum Ch 2: 153.131109
          Histog   : 94.37184   N.List elem: 768  Max: 201117 Idx Max: 14   Min: 314 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.70125013816265   Percentage G: 32.597499723674694   Percentage B: 32.597499723674694
File Start: 2019-06-01 19:26:45.942682  Finish: 2019-06-01 19:26:57.818517   File Time: 0:00:11.875835
CopperWire_1.tif
------------------------------------------------------------------------
Inf.File: CopperWire_1.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_1.tif
    RGB percent from image: CopperWire_1.tif
     ------------------------------
     Percent Red 33.65505173811915
     Percent Green 33.65505173811915
     Percent Blue 32.689896523761696
     ------------------------------
Enhancement color: CopperWire_1.tif   Value: 2.0
   Enhance image: CopperWire_1.tif   Value: 2.0
   Save enhanced file : Enh_CopperWire_1.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_CopperWire_1.tif
   Red background for image: Enh_CopperWire_1.tif
   Save masked image with red background: Mask_Enh_CopperWire_1.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_CopperWire_1.tif
    Main color from image: Mask_Enh_CopperWire_1.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((239, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_CopperWire_1.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 521.051218  Sum Ch 0: 175.360057  Sum Ch 1: 175.360057  Sum Ch 2: 170.331104
          Histog   : 94.37184   N.List elem: 768  Max: 219734 Idx Max: 252   Min: 65 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.65505173811915   Percentage G: 32.689896523761696   Percentage B: 32.689896523761696
File Start: 2019-06-01 19:26:57.819014  Finish: 2019-06-01 19:27:10.114426   File Time: 0:00:12.295412
CopperWire_2.tif
------------------------------------------------------------------------
Inf.File: CopperWire_2.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_2.tif
    RGB percent from image: CopperWire_2.tif
     ------------------------------
     Percent Red 33.60618855121713
     Percent Green 33.60618855121713
     Percent Blue 32.78762289756573
     ------------------------------
Enhancement color: CopperWire_2.tif   Value: 2.0
   Enhance image: CopperWire_2.tif   Value: 2.0
   Save enhanced file : Enh_CopperWire_2.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_CopperWire_2.tif
   Red background for image: Enh_CopperWire_2.tif
   Save masked image with red background: Mask_Enh_CopperWire_2.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_CopperWire_2.tif
    Main color from image: Mask_Enh_CopperWire_2.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((237, 229, 223), 1), ((233, 229, 223), 1), ((245, 228, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_CopperWire_2.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 634.394685  Sum Ch 0: 213.195874  Sum Ch 1: 213.195874  Sum Ch 2: 208.002937
          Histog   : 94.37184   N.List elem: 768  Max: 319958 Idx Max: 252   Min: 205 Idx Min: 156
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.60618855121713   Percentage G: 32.78762289756573   Percentage B: 32.78762289756573
File Start: 2019-06-01 19:27:10.114426  Finish: 2019-06-01 19:27:22.893338   File Time: 0:00:12.778912
CopperWire_3.tif
------------------------------------------------------------------------
Inf.File: CopperWire_3.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_3.tif
    RGB percent from image: CopperWire_3.tif
     ------------------------------
     Percent Red 33.671812077620764
     Percent Green 33.671812077620764
     Percent Blue 32.656375844758465
     ------------------------------
Enhancement color: CopperWire_3.tif   Value: 2.0
   Enhance image: CopperWire_3.tif   Value: 2.0
   Save enhanced file : Enh_CopperWire_3.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_CopperWire_3.tif
   Red background for image: Enh_CopperWire_3.tif
   Save masked image with red background: Mask_Enh_CopperWire_3.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_CopperWire_3.tif
    Main color from image: Mask_Enh_CopperWire_3.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((233, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_CopperWire_3.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 481.236521  Sum Ch 0: 162.041057  Sum Ch 1: 162.041057  Sum Ch 2: 157.154407
          Histog   : 94.37184   N.List elem: 768  Max: 139122 Idx Max: 253   Min: 118 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.671812077620764   Percentage G: 32.656375844758465   Percentage B: 32.656375844758465
File Start: 2019-06-01 19:27:22.893338  Finish: 2019-06-01 19:27:37.218721   File Time: 0:00:14.325383
CopperWire_4.tif
------------------------------------------------------------------------
Inf.File: CopperWire_4.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_4.tif
    RGB percent from image: CopperWire_4.tif
     ------------------------------
     Percent Red 33.6085797831091
     Percent Green 33.6085797831091
     Percent Blue 32.78284043378181
     ------------------------------
Enhancement color: CopperWire_4.tif   Value: 2.0
   Enhance image: CopperWire_4.tif   Value: 2.0
   Save enhanced file : Enh_CopperWire_4.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_CopperWire_4.tif
   Red background for image: Enh_CopperWire_4.tif
   Save masked image with red background: Mask_Enh_CopperWire_4.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_CopperWire_4.tif
    Main color from image: Mask_Enh_CopperWire_4.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((230, 229, 223), 1), ((255, 227, 223), 1), ((250, 227, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_CopperWire_4.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 564.848218  Sum Ch 0: 189.837464  Sum Ch 1: 189.837464  Sum Ch 2: 185.17329
          Histog   : 94.37184   N.List elem: 768  Max: 98434 Idx Max: 51   Min: 41 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.6085797831091   Percentage G: 32.78284043378181   Percentage B: 32.78284043378181
File Start: 2019-06-01 19:27:37.218721  Finish: 2019-06-01 19:27:52.338404   File Time: 0:00:15.119683
CopperWire_5.tif
------------------------------------------------------------------------
Inf.File: CopperWire_5.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_5.tif
    RGB percent from image: CopperWire_5.tif
     ------------------------------
     Percent Red 33.65505173811915
     Percent Green 33.65505173811915
     Percent Blue 32.689896523761696
     ------------------------------
Enhancement color: CopperWire_5.tif   Value: 2.0
   Enhance image: CopperWire_5.tif   Value: 2.0
   Save enhanced file : Enh_CopperWire_5.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_CopperWire_5.tif
   Red background for image: Enh_CopperWire_5.tif
   Save masked image with red background: Mask_Enh_CopperWire_5.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_CopperWire_5.tif
    Main color from image: Mask_Enh_CopperWire_5.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((239, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_CopperWire_5.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 521.051218  Sum Ch 0: 175.360057  Sum Ch 1: 175.360057  Sum Ch 2: 170.331104
          Histog   : 94.37184   N.List elem: 768  Max: 219734 Idx Max: 252   Min: 65 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.65505173811915   Percentage G: 32.689896523761696   Percentage B: 32.689896523761696
File Start: 2019-06-01 19:27:52.338900  Finish: 2019-06-01 19:28:05.232068   File Time: 0:00:12.893168
CopperWire_6.tif
------------------------------------------------------------------------
Inf.File: CopperWire_6.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_6.tif
    RGB percent from image: CopperWire_6.tif
     ------------------------------
     Percent Red 33.60618855121713
     Percent Green 33.60618855121713
     Percent Blue 32.78762289756573
     ------------------------------
Enhancement color: CopperWire_6.tif   Value: 2.0
   Enhance image: CopperWire_6.tif   Value: 2.0
   Save enhanced file : Enh_CopperWire_6.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_CopperWire_6.tif
   Red background for image: Enh_CopperWire_6.tif
   Save masked image with red background: Mask_Enh_CopperWire_6.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_CopperWire_6.tif
    Main color from image: Mask_Enh_CopperWire_6.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((237, 229, 223), 1), ((233, 229, 223), 1), ((245, 228, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_CopperWire_6.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 634.394685  Sum Ch 0: 213.195874  Sum Ch 1: 213.195874  Sum Ch 2: 208.002937
          Histog   : 94.37184   N.List elem: 768  Max: 319958 Idx Max: 252   Min: 205 Idx Min: 156
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.60618855121713   Percentage G: 32.78762289756573   Percentage B: 32.78762289756573
File Start: 2019-06-01 19:28:05.232068  Finish: 2019-06-01 19:28:18.144438   File Time: 0:00:12.912370
CopperWire_7.tif
------------------------------------------------------------------------
Inf.File: CopperWire_7.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_7.tif
    RGB percent from image: CopperWire_7.tif
     ------------------------------
     Percent Red 33.671812077620764
     Percent Green 33.671812077620764
     Percent Blue 32.656375844758465
     ------------------------------
Enhancement color: CopperWire_7.tif   Value: 2.0
   Enhance image: CopperWire_7.tif   Value: 2.0
   Save enhanced file : Enh_CopperWire_7.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_CopperWire_7.tif
   Red background for image: Enh_CopperWire_7.tif
   Save masked image with red background: Mask_Enh_CopperWire_7.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_CopperWire_7.tif
    Main color from image: Mask_Enh_CopperWire_7.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((233, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_CopperWire_7.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 481.236521  Sum Ch 0: 162.041057  Sum Ch 1: 162.041057  Sum Ch 2: 157.154407
          Histog   : 94.37184   N.List elem: 768  Max: 139122 Idx Max: 253   Min: 118 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.671812077620764   Percentage G: 32.656375844758465   Percentage B: 32.656375844758465
File Start: 2019-06-01 19:28:18.144934  Finish: 2019-06-01 19:28:32.117471   File Time: 0:00:13.972537
CopperWire_8.tif
------------------------------------------------------------------------
Inf.File: CopperWire_8.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_8.tif
    RGB percent from image: CopperWire_8.tif
     ------------------------------
     Percent Red 33.6085797831091
     Percent Green 33.6085797831091
     Percent Blue 32.78284043378181
     ------------------------------
Enhancement color: CopperWire_8.tif   Value: 2.0
   Enhance image: CopperWire_8.tif   Value: 2.0
   Save enhanced file : Enh_CopperWire_8.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_CopperWire_8.tif
   Red background for image: Enh_CopperWire_8.tif
   Save masked image with red background: Mask_Enh_CopperWire_8.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_CopperWire_8.tif
    Main color from image: Mask_Enh_CopperWire_8.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((230, 229, 223), 1), ((255, 227, 223), 1), ((250, 227, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_CopperWire_8.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 564.848218  Sum Ch 0: 189.837464  Sum Ch 1: 189.837464  Sum Ch 2: 185.17329
          Histog   : 94.37184   N.List elem: 768  Max: 98434 Idx Max: 51   Min: 41 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.6085797831091   Percentage G: 32.78284043378181   Percentage B: 32.78284043378181
File Start: 2019-06-01 19:28:32.117471  Finish: 2019-06-01 19:28:46.480145   File Time: 0:00:14.362674
Copper_1.tif
------------------------------------------------------------------------
Inf.File: Copper_1.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Copper_1.tif
    RGB percent from image: Copper_1.tif
     ------------------------------
     Percent Red 33.68795564293108
     Percent Green 33.68795564293108
     Percent Blue 32.624088714137834
     ------------------------------
Enhancement color: Copper_1.tif   Value: 2.0
   Enhance image: Copper_1.tif   Value: 2.0
   Save enhanced file : Enh_Copper_1.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Copper_1.tif
   Red background for image: Enh_Copper_1.tif
   Save masked image with red background: Mask_Enh_Copper_1.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Copper_1.tif
    Main color from image: Mask_Enh_Copper_1.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((249, 229, 223), 1), ((247, 229, 223), 1), ((245, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Copper_1.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Copper  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 447.139193  Sum Ch 0: 150.632053  Sum Ch 1: 150.632053  Sum Ch 2: 145.875087
          Histog   : 94.37184   N.List elem: 768  Max: 176926 Idx Max: 15   Min: 289 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.68795564293108   Percentage G: 32.624088714137834   Percentage B: 32.624088714137834
File Start: 2019-06-01 19:28:46.480642  Finish: 2019-06-01 19:28:59.192638   File Time: 0:00:12.711996
Copper_2.tif
------------------------------------------------------------------------
Inf.File: Copper_2.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Copper_2.tif
    RGB percent from image: Copper_2.tif
     ------------------------------
     Percent Red 33.60516338022042
     Percent Green 33.60516338022042
     Percent Blue 32.78967323955916
     ------------------------------
Enhancement color: Copper_2.tif   Value: 2.0
   Enhance image: Copper_2.tif   Value: 2.0
   Save enhanced file : Enh_Copper_2.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Copper_2.tif
   Red background for image: Enh_Copper_2.tif
   Save masked image with red background: Mask_Enh_Copper_2.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Copper_2.tif
    Main color from image: Mask_Enh_Copper_2.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((254, 229, 223), 1), ((248, 229, 223), 1), ((244, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Copper_2.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Copper  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 588.109624  Sum Ch 0: 197.6352  Sum Ch 1: 197.6352  Sum Ch 2: 192.839224
          Histog   : 94.37184   N.List elem: 768  Max: 179730 Idx Max: 253   Min: 552 Idx Min: 0
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.60516338022042   Percentage G: 32.78967323955916   Percentage B: 32.78967323955916
File Start: 2019-06-01 19:28:59.192638  Finish: 2019-06-01 19:29:13.338557   File Time: 0:00:14.145919
Copper_3.tif
------------------------------------------------------------------------
Inf.File: Copper_3.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Copper_3.tif
    RGB percent from image: Copper_3.tif
     ------------------------------
     Percent Red 33.68795564293108
     Percent Green 33.68795564293108
     Percent Blue 32.624088714137834
     ------------------------------
Enhancement color: Copper_3.tif   Value: 2.0
   Enhance image: Copper_3.tif   Value: 2.0
   Save enhanced file : Enh_Copper_3.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Copper_3.tif
   Red background for image: Enh_Copper_3.tif
   Save masked image with red background: Mask_Enh_Copper_3.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Copper_3.tif
    Main color from image: Mask_Enh_Copper_3.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((249, 229, 223), 1), ((247, 229, 223), 1), ((245, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Copper_3.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Copper  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 447.139193  Sum Ch 0: 150.632053  Sum Ch 1: 150.632053  Sum Ch 2: 145.875087
          Histog   : 94.37184   N.List elem: 768  Max: 176926 Idx Max: 15   Min: 289 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.68795564293108   Percentage G: 32.624088714137834   Percentage B: 32.624088714137834
File Start: 2019-06-01 19:29:13.338557  Finish: 2019-06-01 19:29:26.485555   File Time: 0:00:13.146998
Copper_4.tif
------------------------------------------------------------------------
Inf.File: Copper_4.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Copper_4.tif
    RGB percent from image: Copper_4.tif
     ------------------------------
     Percent Red 33.60516338022042
     Percent Green 33.60516338022042
     Percent Blue 32.78967323955916
     ------------------------------
Enhancement color: Copper_4.tif   Value: 2.0
   Enhance image: Copper_4.tif   Value: 2.0
   Save enhanced file : Enh_Copper_4.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Copper_4.tif
   Red background for image: Enh_Copper_4.tif
   Save masked image with red background: Mask_Enh_Copper_4.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Copper_4.tif
    Main color from image: Mask_Enh_Copper_4.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((254, 229, 223), 1), ((248, 229, 223), 1), ((244, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Copper_4.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Copper  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 588.109624  Sum Ch 0: 197.6352  Sum Ch 1: 197.6352  Sum Ch 2: 192.839224
          Histog   : 94.37184   N.List elem: 768  Max: 179730 Idx Max: 253   Min: 552 Idx Min: 0
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.60516338022042   Percentage G: 32.78967323955916   Percentage B: 32.78967323955916
File Start: 2019-06-01 19:29:26.485555  Finish: 2019-06-01 19:29:40.929438   File Time: 0:00:14.443883
Iron_1.tif
------------------------------------------------------------------------
Inf.File: Iron_1.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Iron_1.tif
    RGB percent from image: Iron_1.tif
     ------------------------------
     Percent Red 33.60090837851171
     Percent Green 33.60090837851171
     Percent Blue 32.79818324297658
     ------------------------------
Enhancement color: Iron_1.tif   Value: 2.0
   Enhance image: Iron_1.tif   Value: 2.0
   Save enhanced file : Enh_Iron_1.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Iron_1.tif
   Red background for image: Enh_Iron_1.tif
   Save masked image with red background: Mask_Enh_Iron_1.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Iron_1.tif
    Main color from image: Mask_Enh_Iron_1.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((252, 229, 223), 1), ((240, 229, 223), 1), ((234, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Iron_1.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Iron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 641.517597  Sum Ch 0: 215.55574  Sum Ch 1: 215.55574  Sum Ch 2: 210.406117
          Histog   : 94.37184   N.List elem: 768  Max: 295179 Idx Max: 252   Min: 407 Idx Min: 0
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.60090837851171   Percentage G: 32.79818324297658   Percentage B: 32.79818324297658
File Start: 2019-06-01 19:29:40.929933  Finish: 2019-06-01 19:29:57.020671   File Time: 0:00:16.090738
Iron_2.tif
------------------------------------------------------------------------
Inf.File: Iron_2.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Iron_2.tif
    RGB percent from image: Iron_2.tif
     ------------------------------
     Percent Red 33.60090837851171
     Percent Green 33.60090837851171
     Percent Blue 32.79818324297658
     ------------------------------
Enhancement color: Iron_2.tif   Value: 2.0
   Enhance image: Iron_2.tif   Value: 2.0
   Save enhanced file : Enh_Iron_2.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Iron_2.tif
   Red background for image: Enh_Iron_2.tif
   Save masked image with red background: Mask_Enh_Iron_2.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Iron_2.tif
    Main color from image: Mask_Enh_Iron_2.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((252, 229, 223), 1), ((240, 229, 223), 1), ((234, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Iron_2.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Iron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 641.517597  Sum Ch 0: 215.55574  Sum Ch 1: 215.55574  Sum Ch 2: 210.406117
          Histog   : 94.37184   N.List elem: 768  Max: 295179 Idx Max: 252   Min: 407 Idx Min: 0
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.60090837851171   Percentage G: 32.79818324297658   Percentage B: 32.79818324297658
File Start: 2019-06-01 19:29:57.021157  Finish: 2019-06-01 19:30:13.379445   File Time: 0:00:16.358288
Iron_3.tif
------------------------------------------------------------------------
Inf.File: Iron_3.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Iron_3.tif
    RGB percent from image: Iron_3.tif
     ------------------------------
     Percent Red 33.629611471923226
     Percent Green 33.629611471923226
     Percent Blue 32.74077705615355
     ------------------------------
Enhancement color: Iron_3.tif   Value: 2.0
   Enhance image: Iron_3.tif   Value: 2.0
   Save enhanced file : Enh_Iron_3.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Iron_3.tif
   Red background for image: Enh_Iron_3.tif
   Save masked image with red background: Mask_Enh_Iron_3.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Iron_3.tif
    Main color from image: Mask_Enh_Iron_3.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((254, 229, 223), 1), ((242, 229, 223), 1), ((238, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Iron_3.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Iron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 601.674947  Sum Ch 0: 202.340947  Sum Ch 1: 202.340947  Sum Ch 2: 196.993053
          Histog   : 94.37184   N.List elem: 768  Max: 326204 Idx Max: 252   Min: 303 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.629611471923226   Percentage G: 32.74077705615355   Percentage B: 32.74077705615355
File Start: 2019-06-01 19:30:13.379942  Finish: 2019-06-01 19:30:27.214902   File Time: 0:00:13.834960
Iron_4.tif
------------------------------------------------------------------------
Inf.File: Iron_4.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Iron_4.tif
    RGB percent from image: Iron_4.tif
     ------------------------------
     Percent Red 33.62871679731947
     Percent Green 33.62871679731947
     Percent Blue 32.74256640536107
     ------------------------------
Enhancement color: Iron_4.tif   Value: 2.0
   Enhance image: Iron_4.tif   Value: 2.0
   Save enhanced file : Enh_Iron_4.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_Iron_4.tif
   Red background for image: Enh_Iron_4.tif
   Save masked image with red background: Mask_Enh_Iron_4.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_Iron_4.tif
    Main color from image: Mask_Enh_Iron_4.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((253, 229, 223), 1), ((249, 229, 223), 1), ((247, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_Iron_4.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
Iron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 575.482113  Sum Ch 0: 193.52725  Sum Ch 1: 193.52725  Sum Ch 2: 188.427613
          Histog   : 94.37184   N.List elem: 768  Max: 297351 Idx Max: 252   Min: 413 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.62871679731947   Percentage G: 32.74256640536107   Percentage B: 32.74256640536107
File Start: 2019-06-01 19:30:27.215396  Finish: 2019-06-01 19:30:42.835676   File Time: 0:00:15.620280
PaintedIron_1.tif
------------------------------------------------------------------------
Inf.File: PaintedIron_1.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_1.tif
    RGB percent from image: PaintedIron_1.tif
     ------------------------------
     Percent Red 33.66666144410743
     Percent Green 33.66666144410743
     Percent Blue 32.666677111785134
     ------------------------------
Enhancement color: PaintedIron_1.tif   Value: 2.0
   Enhance image: PaintedIron_1.tif   Value: 2.0
   Save enhanced file : Enh_PaintedIron_1.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_PaintedIron_1.tif
   Red background for image: Enh_PaintedIron_1.tif
   Save masked image with red background: Mask_Enh_PaintedIron_1.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_PaintedIron_1.tif
    Main color from image: Mask_Enh_PaintedIron_1.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((226, 225, 223), 1), ((255, 223, 223), 1), ((250, 223, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_PaintedIron_1.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 495.478663  Sum Ch 0: 166.811124  Sum Ch 1: 166.811124  Sum Ch 2: 161.856415
          Histog   : 94.37184   N.List elem: 768  Max: 221927 Idx Max: 253   Min: 65 Idx Min: 176
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.66666144410743   Percentage G: 32.666677111785134   Percentage B: 32.666677111785134
File Start: 2019-06-01 19:30:42.836172  Finish: 2019-06-01 19:30:53.614288   File Time: 0:00:10.778116
PaintedIron_2.tif
------------------------------------------------------------------------
Inf.File: PaintedIron_2.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_2.tif
    RGB percent from image: PaintedIron_2.tif
     ------------------------------
     Percent Red 33.60762875637241
     Percent Green 33.60762875637241
     Percent Blue 32.78474248725517
     ------------------------------
Enhancement color: PaintedIron_2.tif   Value: 2.0
   Enhance image: PaintedIron_2.tif   Value: 2.0
   Save enhanced file : Enh_PaintedIron_2.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_PaintedIron_2.tif
   Red background for image: Enh_PaintedIron_2.tif
   Save masked image with red background: Mask_Enh_PaintedIron_2.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_PaintedIron_2.tif
    Main color from image: Mask_Enh_PaintedIron_2.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((242, 229, 223), 1), ((234, 229, 223), 1), ((230, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_PaintedIron_2.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 606.481866  Sum Ch 0: 203.824174  Sum Ch 1: 203.824174  Sum Ch 2: 198.833518
          Histog   : 94.37184   N.List elem: 768  Max: 438426 Idx Max: 253   Min: 132 Idx Min: 120
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.60762875637241   Percentage G: 32.78474248725517   Percentage B: 32.78474248725517
File Start: 2019-06-01 19:30:53.614288  Finish: 2019-06-01 19:31:01.149104   File Time: 0:00:07.534816
PaintedIron_3.tif
------------------------------------------------------------------------
Inf.File: PaintedIron_3.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_3.tif
    RGB percent from image: PaintedIron_3.tif
     ------------------------------
     Percent Red 33.62127297548277
     Percent Green 33.62127297548277
     Percent Blue 32.757454049034465
     ------------------------------
Enhancement color: PaintedIron_3.tif   Value: 2.0
   Enhance image: PaintedIron_3.tif   Value: 2.0
   Save enhanced file : Enh_PaintedIron_3.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_PaintedIron_3.tif
   Red background for image: Enh_PaintedIron_3.tif
   Save masked image with red background: Mask_Enh_PaintedIron_3.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_PaintedIron_3.tif
    Main color from image: Mask_Enh_PaintedIron_3.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((233, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_PaintedIron_3.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 573.56847  Sum Ch 0: 192.841021  Sum Ch 1: 192.841021  Sum Ch 2: 187.886428
          Histog   : 94.37184   N.List elem: 768  Max: 374673 Idx Max: 253   Min: 183 Idx Min: 117
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.62127297548277   Percentage G: 32.757454049034465   Percentage B: 32.757454049034465
File Start: 2019-06-01 19:31:01.149104  Finish: 2019-06-01 19:31:08.216060   File Time: 0:00:07.066956
PaintedIron_4.tif
------------------------------------------------------------------------
Inf.File: PaintedIron_4.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_4.tif
    RGB percent from image: PaintedIron_4.tif
     ------------------------------
     Percent Red 33.66666144410743
     Percent Green 33.66666144410743
     Percent Blue 32.666677111785134
     ------------------------------
Enhancement color: PaintedIron_4.tif   Value: 2.0
   Enhance image: PaintedIron_4.tif   Value: 2.0
   Save enhanced file : Enh_PaintedIron_4.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_PaintedIron_4.tif
   Red background for image: Enh_PaintedIron_4.tif
   Save masked image with red background: Mask_Enh_PaintedIron_4.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_PaintedIron_4.tif
    Main color from image: Mask_Enh_PaintedIron_4.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((226, 225, 223), 1), ((255, 223, 223), 1), ((250, 223, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_PaintedIron_4.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 495.478663  Sum Ch 0: 166.811124  Sum Ch 1: 166.811124  Sum Ch 2: 161.856415
          Histog   : 94.37184   N.List elem: 768  Max: 221927 Idx Max: 253   Min: 65 Idx Min: 176
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.66666144410743   Percentage G: 32.666677111785134   Percentage B: 32.666677111785134
File Start: 2019-06-01 19:31:08.216060  Finish: 2019-06-01 19:31:19.226702   File Time: 0:00:11.010642
PaintedIron_5.tif
------------------------------------------------------------------------
Inf.File: PaintedIron_5.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_5.tif
    RGB percent from image: PaintedIron_5.tif
     ------------------------------
     Percent Red 33.60762875637241
     Percent Green 33.60762875637241
     Percent Blue 32.78474248725517
     ------------------------------
Enhancement color: PaintedIron_5.tif   Value: 2.0
   Enhance image: PaintedIron_5.tif   Value: 2.0
   Save enhanced file : Enh_PaintedIron_5.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_PaintedIron_5.tif
   Red background for image: Enh_PaintedIron_5.tif
   Save masked image with red background: Mask_Enh_PaintedIron_5.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_PaintedIron_5.tif
    Main color from image: Mask_Enh_PaintedIron_5.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((242, 229, 223), 1), ((234, 229, 223), 1), ((230, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_PaintedIron_5.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 606.481866  Sum Ch 0: 203.824174  Sum Ch 1: 203.824174  Sum Ch 2: 198.833518
          Histog   : 94.37184   N.List elem: 768  Max: 438426 Idx Max: 253   Min: 132 Idx Min: 120
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.60762875637241   Percentage G: 32.78474248725517   Percentage B: 32.78474248725517
File Start: 2019-06-01 19:31:19.227197  Finish: 2019-06-01 19:31:26.666659   File Time: 0:00:07.439462
PaintedIron_6.tif
------------------------------------------------------------------------
Inf.File: PaintedIron_6.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_6.tif
    RGB percent from image: PaintedIron_6.tif
     ------------------------------
     Percent Red 33.62127297548277
     Percent Green 33.62127297548277
     Percent Blue 32.757454049034465
     ------------------------------
Enhancement color: PaintedIron_6.tif   Value: 2.0
   Enhance image: PaintedIron_6.tif   Value: 2.0
   Save enhanced file : Enh_PaintedIron_6.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_PaintedIron_6.tif
   Red background for image: Enh_PaintedIron_6.tif
   Save masked image with red background: Mask_Enh_PaintedIron_6.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_PaintedIron_6.tif
    Main color from image: Mask_Enh_PaintedIron_6.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((233, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_PaintedIron_6.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 573.56847  Sum Ch 0: 192.841021  Sum Ch 1: 192.841021  Sum Ch 2: 187.886428
          Histog   : 94.37184   N.List elem: 768  Max: 374673 Idx Max: 253   Min: 183 Idx Min: 117
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.62127297548277   Percentage G: 32.757454049034465   Percentage B: 32.757454049034465
File Start: 2019-06-01 19:31:26.666659  Finish: 2019-06-01 19:31:33.957321   File Time: 0:00:07.290662
PaintedIron_7.tif
------------------------------------------------------------------------
Inf.File: PaintedIron_7.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_7.tif
    RGB percent from image: PaintedIron_7.tif
     ------------------------------
     Percent Red 33.60762875637241
     Percent Green 33.60762875637241
     Percent Blue 32.78474248725517
     ------------------------------
Enhancement color: PaintedIron_7.tif   Value: 2.0
   Enhance image: PaintedIron_7.tif   Value: 2.0
   Save enhanced file : Enh_PaintedIron_7.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_PaintedIron_7.tif
   Red background for image: Enh_PaintedIron_7.tif
   Save masked image with red background: Mask_Enh_PaintedIron_7.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_PaintedIron_7.tif
    Main color from image: Mask_Enh_PaintedIron_7.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((242, 229, 223), 1), ((234, 229, 223), 1), ((230, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_PaintedIron_7.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 606.481866  Sum Ch 0: 203.824174  Sum Ch 1: 203.824174  Sum Ch 2: 198.833518
          Histog   : 94.37184   N.List elem: 768  Max: 438426 Idx Max: 253   Min: 132 Idx Min: 120
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.60762875637241   Percentage G: 32.78474248725517   Percentage B: 32.78474248725517
File Start: 2019-06-01 19:31:33.957817  Finish: 2019-06-01 19:31:41.351691   File Time: 0:00:07.393874
StainlessSteel_1.tif
------------------------------------------------------------------------
Inf.File: StainlessSteel_1.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_1.tif
    RGB percent from image: StainlessSteel_1.tif
     ------------------------------
     Percent Red 33.58207473185194
     Percent Green 33.58207473185194
     Percent Blue 32.835850536296114
     ------------------------------
Enhancement color: StainlessSteel_1.tif   Value: 2.0
   Enhance image: StainlessSteel_1.tif   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_1.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_StainlessSteel_1.tif
   Red background for image: Enh_StainlessSteel_1.tif
   Save masked image with red background: Mask_Enh_StainlessSteel_1.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_StainlessSteel_1.tif
    Main color from image: Mask_Enh_StainlessSteel_1.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((255, 229, 223), 1), ((251, 229, 223), 1), ((249, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_StainlessSteel_1.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 654.906666  Sum Ch 0: 219.931246  Sum Ch 1: 219.931246  Sum Ch 2: 215.044174
          Histog   : 94.37184   N.List elem: 768  Max: 366933 Idx Max: 253   Min: 386 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.58207473185194   Percentage G: 32.835850536296114   Percentage B: 32.835850536296114
File Start: 2019-06-01 19:31:41.352681  Finish: 2019-06-01 19:31:55.033147   File Time: 0:00:13.680466
StainlessSteel_2.tif
------------------------------------------------------------------------
Inf.File: StainlessSteel_2.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_2.tif
    RGB percent from image: StainlessSteel_2.tif
     ------------------------------
     Percent Red 33.61617790672816
     Percent Green 33.61617790672816
     Percent Blue 32.76764418654368
     ------------------------------
Enhancement color: StainlessSteel_2.tif   Value: 2.0
   Enhance image: StainlessSteel_2.tif   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_2.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_StainlessSteel_2.tif
   Red background for image: Enh_StainlessSteel_2.tif
   Save masked image with red background: Mask_Enh_StainlessSteel_2.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_StainlessSteel_2.tif
    Main color from image: Mask_Enh_StainlessSteel_2.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((251, 229, 223), 1), ((245, 229, 223), 1), ((243, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_StainlessSteel_2.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 573.675257  Sum Ch 0: 192.847695  Sum Ch 1: 192.847695  Sum Ch 2: 187.979867
          Histog   : 94.37184   N.List elem: 768  Max: 356158 Idx Max: 253   Min: 460 Idx Min: 237
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.61617790672816   Percentage G: 32.76764418654368   Percentage B: 32.76764418654368
File Start: 2019-06-01 19:31:55.033642  Finish: 2019-06-01 19:32:09.438525   File Time: 0:00:14.404883
StainlessSteel_3.tif
------------------------------------------------------------------------
Inf.File: StainlessSteel_3.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_3.tif
    RGB percent from image: StainlessSteel_3.tif
     ------------------------------
     Percent Red 33.58207473185194
     Percent Green 33.58207473185194
     Percent Blue 32.835850536296114
     ------------------------------
Enhancement color: StainlessSteel_3.tif   Value: 2.0
   Enhance image: StainlessSteel_3.tif   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_3.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_StainlessSteel_3.tif
   Red background for image: Enh_StainlessSteel_3.tif
   Save masked image with red background: Mask_Enh_StainlessSteel_3.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_StainlessSteel_3.tif
    Main color from image: Mask_Enh_StainlessSteel_3.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((255, 229, 223), 1), ((251, 229, 223), 1), ((249, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_StainlessSteel_3.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 654.906666  Sum Ch 0: 219.931246  Sum Ch 1: 219.931246  Sum Ch 2: 215.044174
          Histog   : 94.37184   N.List elem: 768  Max: 366933 Idx Max: 253   Min: 386 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.58207473185194   Percentage G: 32.835850536296114   Percentage B: 32.835850536296114
File Start: 2019-06-01 19:32:09.439021  Finish: 2019-06-01 19:32:23.453107   File Time: 0:00:14.014086
StainlessSteel_4.tif
------------------------------------------------------------------------
Inf.File: StainlessSteel_4.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_4.tif
    RGB percent from image: StainlessSteel_4.tif
     ------------------------------
     Percent Red 33.61617790672816
     Percent Green 33.61617790672816
     Percent Blue 32.76764418654368
     ------------------------------
Enhancement color: StainlessSteel_4.tif   Value: 2.0
   Enhance image: StainlessSteel_4.tif   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_4.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_StainlessSteel_4.tif
   Red background for image: Enh_StainlessSteel_4.tif
   Save masked image with red background: Mask_Enh_StainlessSteel_4.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_StainlessSteel_4.tif
    Main color from image: Mask_Enh_StainlessSteel_4.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((251, 229, 223), 1), ((245, 229, 223), 1), ((243, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_StainlessSteel_4.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 573.675257  Sum Ch 0: 192.847695  Sum Ch 1: 192.847695  Sum Ch 2: 187.979867
          Histog   : 94.37184   N.List elem: 768  Max: 356158 Idx Max: 253   Min: 460 Idx Min: 237
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.61617790672816   Percentage G: 32.76764418654368   Percentage B: 32.76764418654368
File Start: 2019-06-01 19:32:23.453107  Finish: 2019-06-01 19:32:38.191049   File Time: 0:00:14.737942
StainlessSteel_5.tif
------------------------------------------------------------------------
Inf.File: StainlessSteel_5.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_5.tif
    RGB percent from image: StainlessSteel_5.tif
     ------------------------------
     Percent Red 33.60690411510592
     Percent Green 33.60690411510592
     Percent Blue 32.78619176978816
     ------------------------------
Enhancement color: StainlessSteel_5.tif   Value: 2.0
   Enhance image: StainlessSteel_5.tif   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_5.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_StainlessSteel_5.tif
   Red background for image: Enh_StainlessSteel_5.tif
   Save masked image with red background: Mask_Enh_StainlessSteel_5.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_StainlessSteel_5.tif
    Main color from image: Mask_Enh_StainlessSteel_5.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((243, 229, 223), 1), ((235, 229, 223), 1), ((233, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_StainlessSteel_5.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 638.936045  Sum Ch 0: 214.726624  Sum Ch 1: 214.726624  Sum Ch 2: 209.482797
          Histog   : 94.37184   N.List elem: 768  Max: 370886 Idx Max: 252   Min: 461 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.60690411510592   Percentage G: 32.78619176978816   Percentage B: 32.78619176978816
File Start: 2019-06-01 19:32:38.191546  Finish: 2019-06-01 19:32:53.014882   File Time: 0:00:14.823336
StainlessSteel_6.tif
------------------------------------------------------------------------
Inf.File: StainlessSteel_6.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_6.tif
    RGB percent from image: StainlessSteel_6.tif
     ------------------------------
     Percent Red 33.58479745441777
     Percent Green 33.58479745441777
     Percent Blue 32.83040509116447
     ------------------------------
Enhancement color: StainlessSteel_6.tif   Value: 2.0
   Enhance image: StainlessSteel_6.tif   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_6.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_StainlessSteel_6.tif
   Red background for image: Enh_StainlessSteel_6.tif
   Save masked image with red background: Mask_Enh_StainlessSteel_6.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_StainlessSteel_6.tif
    Main color from image: Mask_Enh_StainlessSteel_6.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((249, 229, 223), 1), ((245, 229, 223), 1), ((241, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_StainlessSteel_6.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 731.365569  Sum Ch 0: 245.627645  Sum Ch 1: 245.627645  Sum Ch 2: 240.110279
          Histog   : 94.37184   N.List elem: 768  Max: 497534 Idx Max: 252   Min: 236 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.58479745441777   Percentage G: 32.83040509116447   Percentage B: 32.83040509116447
File Start: 2019-06-01 19:32:53.015377  Finish: 2019-06-01 19:33:07.432896   File Time: 0:00:14.417519
StainlessSteel_7.tif
------------------------------------------------------------------------
Inf.File: StainlessSteel_7.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_7.tif
    RGB percent from image: StainlessSteel_7.tif
     ------------------------------
     Percent Red 33.60334018475968
     Percent Green 33.60334018475968
     Percent Blue 32.793319630480624
     ------------------------------
Enhancement color: StainlessSteel_7.tif   Value: 2.0
   Enhance image: StainlessSteel_7.tif   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_7.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_StainlessSteel_7.tif
   Red background for image: Enh_StainlessSteel_7.tif
   Save masked image with red background: Mask_Enh_StainlessSteel_7.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_StainlessSteel_7.tif
    Main color from image: Mask_Enh_StainlessSteel_7.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((249, 229, 223), 1), ((245, 229, 223), 1), ((239, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_StainlessSteel_7.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 595.649206  Sum Ch 0: 200.158029  Sum Ch 1: 200.158029  Sum Ch 2: 195.333148
          Histog   : 94.37184   N.List elem: 768  Max: 326367 Idx Max: 253   Min: 673 Idx Min: 139
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.60334018475968   Percentage G: 32.793319630480624   Percentage B: 32.793319630480624
File Start: 2019-06-01 19:33:07.432896  Finish: 2019-06-01 19:33:19.170649   File Time: 0:00:11.737753
StainlessSteel_8.tif
------------------------------------------------------------------------
Inf.File: StainlessSteel_8.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_8.tif
    RGB percent from image: StainlessSteel_8.tif
     ------------------------------
     Percent Red 33.59733292716074
     Percent Green 33.59733292716074
     Percent Blue 32.80533414567851
     ------------------------------
Enhancement color: StainlessSteel_8.tif   Value: 2.0
   Enhance image: StainlessSteel_8.tif   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_8.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_StainlessSteel_8.tif
   Red background for image: Enh_StainlessSteel_8.tif
   Save masked image with red background: Mask_Enh_StainlessSteel_8.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_StainlessSteel_8.tif
    Main color from image: Mask_Enh_StainlessSteel_8.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((245, 229, 223), 1), ((243, 229, 223), 1), ((241, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_StainlessSteel_8.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 611.667734  Sum Ch 0: 205.504045  Sum Ch 1: 205.504045  Sum Ch 2: 200.659644
          Histog   : 94.37184   N.List elem: 768  Max: 357902 Idx Max: 253   Min: 581 Idx Min: 255
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.59733292716074   Percentage G: 32.80533414567851   Percentage B: 32.80533414567851
File Start: 2019-06-01 19:33:19.170649  Finish: 2019-06-01 19:33:33.486505   File Time: 0:00:14.315856
StainlessSteel_9.tif
------------------------------------------------------------------------
Inf.File: StainlessSteel_9.tif
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_9.tif
    RGB percent from image: StainlessSteel_9.tif
     ------------------------------
     Percent Red 33.528715186138044
     Percent Green 33.528715186138044
     Percent Blue 32.94256962772391
     ------------------------------
Enhancement color: StainlessSteel_9.tif   Value: 2.0
   Enhance image: StainlessSteel_9.tif   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_9.tif
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Enh_StainlessSteel_9.tif
   Red background for image: Enh_StainlessSteel_9.tif
   Save masked image with red background: Mask_Enh_StainlessSteel_9.tif
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/ Mask_Enh_StainlessSteel_9.tif
    Main color from image: Mask_Enh_StainlessSteel_9.tif
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 255, 255), 1), ((249, 229, 223), 1), ((243, 229, 223), 1), ((239, 229, 223), 1)]
      Read color name: (255, 255, 255)
      Main Color file: Mask_Enh_StainlessSteel_9.tif  RGB: [((255, 255, 255), 1)] (255, 255, 255)  Color name: white  Hex: #ffffff
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 860.058381  Sum Ch 0: 288.366525  Sum Ch 1: 288.366525  Sum Ch 2: 283.325331
          Histog   : 94.37184   N.List elem: 768  Max: 601745 Idx Max: 253   Min: 458 Idx Min: 108
          Color    : white    RGB   : (255, 255, 255)    Hex color: #ffffff   Dec Color: 16777215
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.528715186138044   Percentage G: 32.94256962772391   Percentage B: 32.94256962772391
File Start: 2019-06-01 19:33:33.486505  Finish: 2019-06-01 19:33:48.714942   File Time: 0:00:15.228437
Process Start: 2019-06-01 19:23:48.080869  Finish: 2019-06-01 19:33:48.715437   Global Time: 0:10:00.634568
In [26]:
#list_dec_back ordered
order_list_dec = sorted(list_dec_back, key=int) 
#order_list_dec
#list_non_back 
In [27]:
'''
TESTS
# Read all list to see the color - obtain RGB from int
for x in order_list_dec:
    #print(x)
    # Get RGB from INT
    xrgb = getRGBfromI(x)
    #print('Int:, x,'  RGB: ',xrgb)
    xt_color_name , hexdc = get_rgb_color_name(xrgb)
    print('Int:', x,'  RGB: ', xrgb, xt_color_name)
'''          
Out[27]:
"\nTESTS\n# Read all list to see the color - obtain RGB from int\nfor x in order_list_dec:\n    #print(x)\n    # Get RGB from INT\n    xrgb = getRGBfromI(x)\n    #print('Int:, x,'  RGB: ',xrgb)\n    xt_color_name , hexdc = get_rgb_color_name(xrgb)\n    print('Int:', x,'  RGB: ', xrgb, xt_color_name)\n"
In [28]:
df = pd.DataFrame(df_image,columns=['Folder','File','Material','Size','Format','Mode',
                                    'All_Bands', 'Sum_Ch0','Sum_Ch1','Sum_Ch2',
                                    'Histogram','Number_elements',
                                    'Color','Color_RGB', 'Color_hex','Color_dec','Med_Extrems',
                                    'Max_Histog', 'Idx_Max_Histog','Min_Histog', 'Idx_Min_Histog',
                                    'perc_R', 'perc_G', 'perc_B'])
df.head(10)
Out[28]:
Folder File Material Size Format Mode All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 ... Color_hex Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
0 imagedata06 Aluminum_1.tif Aluminum (2048, 1536) TIFF RGB 658.137536 220.999978 220.999978 216.137580 ... #ffffff 16777215 127.833333 237292 11 543 109 33.579604 33.579604 32.840792
1 imagedata06 Aluminum_2.tif Aluminum (2048, 1536) TIFF RGB 693.024169 232.705276 232.705276 227.613617 ... #ffffff 16777215 127.833333 280312 252 648 129 33.578234 33.578234 32.843532
2 imagedata06 Aluminum_3.tif Aluminum (2048, 1536) TIFF RGB 696.532319 233.779842 233.779842 228.972635 ... #ffffff 16777215 127.833333 248402 8 819 94 33.563388 33.563388 32.873225
3 imagedata06 Aluminum_4.tif Aluminum (2048, 1536) TIFF RGB 658.137536 220.999978 220.999978 216.137580 ... #ffffff 16777215 127.833333 237292 11 543 109 33.579604 33.579604 32.840792
4 imagedata06 Aluminum_5.tif Aluminum (2048, 1536) TIFF RGB 693.024169 232.705276 232.705276 227.613617 ... #ffffff 16777215 127.833333 280312 252 648 129 33.578234 33.578234 32.843532
5 imagedata06 Aluminum_6.tif Aluminum (2048, 1536) TIFF RGB 696.532319 233.779842 233.779842 228.972635 ... #ffffff 16777215 127.833333 248402 8 819 94 33.563388 33.563388 32.873225
6 imagedata06 Brass_1.tif Brass (2048, 1536) TIFF RGB 562.098115 189.033946 189.033946 184.030223 ... #ffffff 16777215 127.833333 217593 252 249 0 33.630062 33.630062 32.739875
7 imagedata06 Brass_2.tif Brass (2048, 1536) TIFF RGB 449.396523 151.345791 151.345791 146.704941 ... #ffffff 16777215 127.833333 179424 19 252 0 33.677562 33.677562 32.644877
8 imagedata06 Brass_3.tif Brass (2048, 1536) TIFF RGB 469.763357 158.316124 158.316124 153.131109 ... #ffffff 16777215 127.833333 201117 14 314 255 33.701250 33.701250 32.597500
9 imagedata06 Brass_4.tif Brass (2048, 1536) TIFF RGB 562.098115 189.033946 189.033946 184.030223 ... #ffffff 16777215 127.833333 217593 252 249 0 33.630062 33.630062 32.739875

10 rows × 24 columns

In [29]:
# Delete junk records
df = df[df.Material != 'MASK']
df = df[df.Material != 'Enh']
df
Out[29]:
Folder File Material Size Format Mode All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 ... Color_hex Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
0 imagedata06 Aluminum_1.tif Aluminum (2048, 1536) TIFF RGB 658.137536 220.999978 220.999978 216.137580 ... #ffffff 16777215 127.833333 237292 11 543 109 33.579604 33.579604 32.840792
1 imagedata06 Aluminum_2.tif Aluminum (2048, 1536) TIFF RGB 693.024169 232.705276 232.705276 227.613617 ... #ffffff 16777215 127.833333 280312 252 648 129 33.578234 33.578234 32.843532
2 imagedata06 Aluminum_3.tif Aluminum (2048, 1536) TIFF RGB 696.532319 233.779842 233.779842 228.972635 ... #ffffff 16777215 127.833333 248402 8 819 94 33.563388 33.563388 32.873225
3 imagedata06 Aluminum_4.tif Aluminum (2048, 1536) TIFF RGB 658.137536 220.999978 220.999978 216.137580 ... #ffffff 16777215 127.833333 237292 11 543 109 33.579604 33.579604 32.840792
4 imagedata06 Aluminum_5.tif Aluminum (2048, 1536) TIFF RGB 693.024169 232.705276 232.705276 227.613617 ... #ffffff 16777215 127.833333 280312 252 648 129 33.578234 33.578234 32.843532
5 imagedata06 Aluminum_6.tif Aluminum (2048, 1536) TIFF RGB 696.532319 233.779842 233.779842 228.972635 ... #ffffff 16777215 127.833333 248402 8 819 94 33.563388 33.563388 32.873225
6 imagedata06 Brass_1.tif Brass (2048, 1536) TIFF RGB 562.098115 189.033946 189.033946 184.030223 ... #ffffff 16777215 127.833333 217593 252 249 0 33.630062 33.630062 32.739875
7 imagedata06 Brass_2.tif Brass (2048, 1536) TIFF RGB 449.396523 151.345791 151.345791 146.704941 ... #ffffff 16777215 127.833333 179424 19 252 0 33.677562 33.677562 32.644877
8 imagedata06 Brass_3.tif Brass (2048, 1536) TIFF RGB 469.763357 158.316124 158.316124 153.131109 ... #ffffff 16777215 127.833333 201117 14 314 255 33.701250 33.701250 32.597500
9 imagedata06 Brass_4.tif Brass (2048, 1536) TIFF RGB 562.098115 189.033946 189.033946 184.030223 ... #ffffff 16777215 127.833333 217593 252 249 0 33.630062 33.630062 32.739875
10 imagedata06 Brass_5.tif Brass (2048, 1536) TIFF RGB 449.396523 151.345791 151.345791 146.704941 ... #ffffff 16777215 127.833333 179424 19 252 0 33.677562 33.677562 32.644877
11 imagedata06 Brass_6.tif Brass (2048, 1536) TIFF RGB 469.763357 158.316124 158.316124 153.131109 ... #ffffff 16777215 127.833333 201117 14 314 255 33.701250 33.701250 32.597500
12 imagedata06 CopperWire_1.tif CopperWire (2048, 1536) TIFF RGB 521.051218 175.360057 175.360057 170.331104 ... #ffffff 16777215 127.833333 219734 252 65 255 33.655052 33.655052 32.689897
13 imagedata06 CopperWire_2.tif CopperWire (2048, 1536) TIFF RGB 634.394685 213.195874 213.195874 208.002937 ... #ffffff 16777215 127.833333 319958 252 205 156 33.606189 33.606189 32.787623
14 imagedata06 CopperWire_3.tif CopperWire (2048, 1536) TIFF RGB 481.236521 162.041057 162.041057 157.154407 ... #ffffff 16777215 127.833333 139122 253 118 255 33.671812 33.671812 32.656376
15 imagedata06 CopperWire_4.tif CopperWire (2048, 1536) TIFF RGB 564.848218 189.837464 189.837464 185.173290 ... #ffffff 16777215 127.833333 98434 51 41 255 33.608580 33.608580 32.782840
16 imagedata06 CopperWire_5.tif CopperWire (2048, 1536) TIFF RGB 521.051218 175.360057 175.360057 170.331104 ... #ffffff 16777215 127.833333 219734 252 65 255 33.655052 33.655052 32.689897
17 imagedata06 CopperWire_6.tif CopperWire (2048, 1536) TIFF RGB 634.394685 213.195874 213.195874 208.002937 ... #ffffff 16777215 127.833333 319958 252 205 156 33.606189 33.606189 32.787623
18 imagedata06 CopperWire_7.tif CopperWire (2048, 1536) TIFF RGB 481.236521 162.041057 162.041057 157.154407 ... #ffffff 16777215 127.833333 139122 253 118 255 33.671812 33.671812 32.656376
19 imagedata06 CopperWire_8.tif CopperWire (2048, 1536) TIFF RGB 564.848218 189.837464 189.837464 185.173290 ... #ffffff 16777215 127.833333 98434 51 41 255 33.608580 33.608580 32.782840
20 imagedata06 Copper_1.tif Copper (2048, 1536) TIFF RGB 447.139193 150.632053 150.632053 145.875087 ... #ffffff 16777215 127.833333 176926 15 289 255 33.687956 33.687956 32.624089
21 imagedata06 Copper_2.tif Copper (2048, 1536) TIFF RGB 588.109624 197.635200 197.635200 192.839224 ... #ffffff 16777215 127.833333 179730 253 552 0 33.605163 33.605163 32.789673
22 imagedata06 Copper_3.tif Copper (2048, 1536) TIFF RGB 447.139193 150.632053 150.632053 145.875087 ... #ffffff 16777215 127.833333 176926 15 289 255 33.687956 33.687956 32.624089
23 imagedata06 Copper_4.tif Copper (2048, 1536) TIFF RGB 588.109624 197.635200 197.635200 192.839224 ... #ffffff 16777215 127.833333 179730 253 552 0 33.605163 33.605163 32.789673
24 imagedata06 Iron_1.tif Iron (2048, 1536) TIFF RGB 641.517597 215.555740 215.555740 210.406117 ... #ffffff 16777215 127.833333 295179 252 407 0 33.600908 33.600908 32.798183
25 imagedata06 Iron_2.tif Iron (2048, 1536) TIFF RGB 641.517597 215.555740 215.555740 210.406117 ... #ffffff 16777215 127.833333 295179 252 407 0 33.600908 33.600908 32.798183
26 imagedata06 Iron_3.tif Iron (2048, 1536) TIFF RGB 601.674947 202.340947 202.340947 196.993053 ... #ffffff 16777215 127.833333 326204 252 303 255 33.629611 33.629611 32.740777
27 imagedata06 Iron_4.tif Iron (2048, 1536) TIFF RGB 575.482113 193.527250 193.527250 188.427613 ... #ffffff 16777215 127.833333 297351 252 413 255 33.628717 33.628717 32.742566
28 imagedata06 PaintedIron_1.tif PaintedIron (2048, 1536) TIFF RGB 495.478663 166.811124 166.811124 161.856415 ... #ffffff 16777215 127.833333 221927 253 65 176 33.666661 33.666661 32.666677
29 imagedata06 PaintedIron_2.tif PaintedIron (2048, 1536) TIFF RGB 606.481866 203.824174 203.824174 198.833518 ... #ffffff 16777215 127.833333 438426 253 132 120 33.607629 33.607629 32.784742
30 imagedata06 PaintedIron_3.tif PaintedIron (2048, 1536) TIFF RGB 573.568470 192.841021 192.841021 187.886428 ... #ffffff 16777215 127.833333 374673 253 183 117 33.621273 33.621273 32.757454
31 imagedata06 PaintedIron_4.tif PaintedIron (2048, 1536) TIFF RGB 495.478663 166.811124 166.811124 161.856415 ... #ffffff 16777215 127.833333 221927 253 65 176 33.666661 33.666661 32.666677
32 imagedata06 PaintedIron_5.tif PaintedIron (2048, 1536) TIFF RGB 606.481866 203.824174 203.824174 198.833518 ... #ffffff 16777215 127.833333 438426 253 132 120 33.607629 33.607629 32.784742
33 imagedata06 PaintedIron_6.tif PaintedIron (2048, 1536) TIFF RGB 573.568470 192.841021 192.841021 187.886428 ... #ffffff 16777215 127.833333 374673 253 183 117 33.621273 33.621273 32.757454
34 imagedata06 PaintedIron_7.tif PaintedIron (2048, 1536) TIFF RGB 606.481866 203.824174 203.824174 198.833518 ... #ffffff 16777215 127.833333 438426 253 132 120 33.607629 33.607629 32.784742
35 imagedata06 StainlessSteel_1.tif StainlessSteel (2048, 1536) TIFF RGB 654.906666 219.931246 219.931246 215.044174 ... #ffffff 16777215 127.833333 366933 253 386 255 33.582075 33.582075 32.835851
36 imagedata06 StainlessSteel_2.tif StainlessSteel (2048, 1536) TIFF RGB 573.675257 192.847695 192.847695 187.979867 ... #ffffff 16777215 127.833333 356158 253 460 237 33.616178 33.616178 32.767644
37 imagedata06 StainlessSteel_3.tif StainlessSteel (2048, 1536) TIFF RGB 654.906666 219.931246 219.931246 215.044174 ... #ffffff 16777215 127.833333 366933 253 386 255 33.582075 33.582075 32.835851
38 imagedata06 StainlessSteel_4.tif StainlessSteel (2048, 1536) TIFF RGB 573.675257 192.847695 192.847695 187.979867 ... #ffffff 16777215 127.833333 356158 253 460 237 33.616178 33.616178 32.767644
39 imagedata06 StainlessSteel_5.tif StainlessSteel (2048, 1536) TIFF RGB 638.936045 214.726624 214.726624 209.482797 ... #ffffff 16777215 127.833333 370886 252 461 255 33.606904 33.606904 32.786192
40 imagedata06 StainlessSteel_6.tif StainlessSteel (2048, 1536) TIFF RGB 731.365569 245.627645 245.627645 240.110279 ... #ffffff 16777215 127.833333 497534 252 236 255 33.584797 33.584797 32.830405
41 imagedata06 StainlessSteel_7.tif StainlessSteel (2048, 1536) TIFF RGB 595.649206 200.158029 200.158029 195.333148 ... #ffffff 16777215 127.833333 326367 253 673 139 33.603340 33.603340 32.793320
42 imagedata06 StainlessSteel_8.tif StainlessSteel (2048, 1536) TIFF RGB 611.667734 205.504045 205.504045 200.659644 ... #ffffff 16777215 127.833333 357902 253 581 255 33.597333 33.597333 32.805334
43 imagedata06 StainlessSteel_9.tif StainlessSteel (2048, 1536) TIFF RGB 860.058381 288.366525 288.366525 283.325331 ... #ffffff 16777215 127.833333 601745 253 458 108 33.528715 33.528715 32.942570

44 rows × 24 columns

Write statistics in excel book

In [30]:
# Verify my current folder
path = mypath + r"/upt_data.xlsx"
print('Write statistics into file :', path)

# Block to Read excel old excel file
book = load_workbook(path)
writer = pd.ExcelWriter(path, engine = 'openpyxl')
writer.book = book
# ------------------------

# Write statistics into excel file
#writer = pd.ExcelWriter(path, engine = 'xlsxwriter') # only for new excelfile
df.to_excel(writer, sheet_name = folder)
writer.save()
writer.close()
Write statistics into file : C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/upt_data.xlsx

Plot

In [31]:
df_plot = pd.DataFrame(df, columns=["Material", "All_Bands", "Sum_Ch0", "Sum_Ch1", "Sum_Ch2",
                                    "Color", "Color_RGB", "Color_hex","Color_dec",
                                    "Med_Extrems", "Max_Histog", "Idx_Max_Histog","Min_Histog",
                                    "Idx_Min_Histog","perc_R", "perc_G", "perc_B"])
df_plot
Out[31]:
Material All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 Color Color_RGB Color_hex Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
0 Aluminum 658.137536 220.999978 220.999978 216.137580 white (255, 255, 255) #ffffff 16777215 127.833333 237292 11 543 109 33.579604 33.579604 32.840792
1 Aluminum 693.024169 232.705276 232.705276 227.613617 white (255, 255, 255) #ffffff 16777215 127.833333 280312 252 648 129 33.578234 33.578234 32.843532
2 Aluminum 696.532319 233.779842 233.779842 228.972635 white (255, 255, 255) #ffffff 16777215 127.833333 248402 8 819 94 33.563388 33.563388 32.873225
3 Aluminum 658.137536 220.999978 220.999978 216.137580 white (255, 255, 255) #ffffff 16777215 127.833333 237292 11 543 109 33.579604 33.579604 32.840792
4 Aluminum 693.024169 232.705276 232.705276 227.613617 white (255, 255, 255) #ffffff 16777215 127.833333 280312 252 648 129 33.578234 33.578234 32.843532
5 Aluminum 696.532319 233.779842 233.779842 228.972635 white (255, 255, 255) #ffffff 16777215 127.833333 248402 8 819 94 33.563388 33.563388 32.873225
6 Brass 562.098115 189.033946 189.033946 184.030223 white (255, 255, 255) #ffffff 16777215 127.833333 217593 252 249 0 33.630062 33.630062 32.739875
7 Brass 449.396523 151.345791 151.345791 146.704941 white (255, 255, 255) #ffffff 16777215 127.833333 179424 19 252 0 33.677562 33.677562 32.644877
8 Brass 469.763357 158.316124 158.316124 153.131109 white (255, 255, 255) #ffffff 16777215 127.833333 201117 14 314 255 33.701250 33.701250 32.597500
9 Brass 562.098115 189.033946 189.033946 184.030223 white (255, 255, 255) #ffffff 16777215 127.833333 217593 252 249 0 33.630062 33.630062 32.739875
10 Brass 449.396523 151.345791 151.345791 146.704941 white (255, 255, 255) #ffffff 16777215 127.833333 179424 19 252 0 33.677562 33.677562 32.644877
11 Brass 469.763357 158.316124 158.316124 153.131109 white (255, 255, 255) #ffffff 16777215 127.833333 201117 14 314 255 33.701250 33.701250 32.597500
12 CopperWire 521.051218 175.360057 175.360057 170.331104 white (255, 255, 255) #ffffff 16777215 127.833333 219734 252 65 255 33.655052 33.655052 32.689897
13 CopperWire 634.394685 213.195874 213.195874 208.002937 white (255, 255, 255) #ffffff 16777215 127.833333 319958 252 205 156 33.606189 33.606189 32.787623
14 CopperWire 481.236521 162.041057 162.041057 157.154407 white (255, 255, 255) #ffffff 16777215 127.833333 139122 253 118 255 33.671812 33.671812 32.656376
15 CopperWire 564.848218 189.837464 189.837464 185.173290 white (255, 255, 255) #ffffff 16777215 127.833333 98434 51 41 255 33.608580 33.608580 32.782840
16 CopperWire 521.051218 175.360057 175.360057 170.331104 white (255, 255, 255) #ffffff 16777215 127.833333 219734 252 65 255 33.655052 33.655052 32.689897
17 CopperWire 634.394685 213.195874 213.195874 208.002937 white (255, 255, 255) #ffffff 16777215 127.833333 319958 252 205 156 33.606189 33.606189 32.787623
18 CopperWire 481.236521 162.041057 162.041057 157.154407 white (255, 255, 255) #ffffff 16777215 127.833333 139122 253 118 255 33.671812 33.671812 32.656376
19 CopperWire 564.848218 189.837464 189.837464 185.173290 white (255, 255, 255) #ffffff 16777215 127.833333 98434 51 41 255 33.608580 33.608580 32.782840
20 Copper 447.139193 150.632053 150.632053 145.875087 white (255, 255, 255) #ffffff 16777215 127.833333 176926 15 289 255 33.687956 33.687956 32.624089
21 Copper 588.109624 197.635200 197.635200 192.839224 white (255, 255, 255) #ffffff 16777215 127.833333 179730 253 552 0 33.605163 33.605163 32.789673
22 Copper 447.139193 150.632053 150.632053 145.875087 white (255, 255, 255) #ffffff 16777215 127.833333 176926 15 289 255 33.687956 33.687956 32.624089
23 Copper 588.109624 197.635200 197.635200 192.839224 white (255, 255, 255) #ffffff 16777215 127.833333 179730 253 552 0 33.605163 33.605163 32.789673
24 Iron 641.517597 215.555740 215.555740 210.406117 white (255, 255, 255) #ffffff 16777215 127.833333 295179 252 407 0 33.600908 33.600908 32.798183
25 Iron 641.517597 215.555740 215.555740 210.406117 white (255, 255, 255) #ffffff 16777215 127.833333 295179 252 407 0 33.600908 33.600908 32.798183
26 Iron 601.674947 202.340947 202.340947 196.993053 white (255, 255, 255) #ffffff 16777215 127.833333 326204 252 303 255 33.629611 33.629611 32.740777
27 Iron 575.482113 193.527250 193.527250 188.427613 white (255, 255, 255) #ffffff 16777215 127.833333 297351 252 413 255 33.628717 33.628717 32.742566
28 PaintedIron 495.478663 166.811124 166.811124 161.856415 white (255, 255, 255) #ffffff 16777215 127.833333 221927 253 65 176 33.666661 33.666661 32.666677
29 PaintedIron 606.481866 203.824174 203.824174 198.833518 white (255, 255, 255) #ffffff 16777215 127.833333 438426 253 132 120 33.607629 33.607629 32.784742
30 PaintedIron 573.568470 192.841021 192.841021 187.886428 white (255, 255, 255) #ffffff 16777215 127.833333 374673 253 183 117 33.621273 33.621273 32.757454
31 PaintedIron 495.478663 166.811124 166.811124 161.856415 white (255, 255, 255) #ffffff 16777215 127.833333 221927 253 65 176 33.666661 33.666661 32.666677
32 PaintedIron 606.481866 203.824174 203.824174 198.833518 white (255, 255, 255) #ffffff 16777215 127.833333 438426 253 132 120 33.607629 33.607629 32.784742
33 PaintedIron 573.568470 192.841021 192.841021 187.886428 white (255, 255, 255) #ffffff 16777215 127.833333 374673 253 183 117 33.621273 33.621273 32.757454
34 PaintedIron 606.481866 203.824174 203.824174 198.833518 white (255, 255, 255) #ffffff 16777215 127.833333 438426 253 132 120 33.607629 33.607629 32.784742
35 StainlessSteel 654.906666 219.931246 219.931246 215.044174 white (255, 255, 255) #ffffff 16777215 127.833333 366933 253 386 255 33.582075 33.582075 32.835851
36 StainlessSteel 573.675257 192.847695 192.847695 187.979867 white (255, 255, 255) #ffffff 16777215 127.833333 356158 253 460 237 33.616178 33.616178 32.767644
37 StainlessSteel 654.906666 219.931246 219.931246 215.044174 white (255, 255, 255) #ffffff 16777215 127.833333 366933 253 386 255 33.582075 33.582075 32.835851
38 StainlessSteel 573.675257 192.847695 192.847695 187.979867 white (255, 255, 255) #ffffff 16777215 127.833333 356158 253 460 237 33.616178 33.616178 32.767644
39 StainlessSteel 638.936045 214.726624 214.726624 209.482797 white (255, 255, 255) #ffffff 16777215 127.833333 370886 252 461 255 33.606904 33.606904 32.786192
40 StainlessSteel 731.365569 245.627645 245.627645 240.110279 white (255, 255, 255) #ffffff 16777215 127.833333 497534 252 236 255 33.584797 33.584797 32.830405
41 StainlessSteel 595.649206 200.158029 200.158029 195.333148 white (255, 255, 255) #ffffff 16777215 127.833333 326367 253 673 139 33.603340 33.603340 32.793320
42 StainlessSteel 611.667734 205.504045 205.504045 200.659644 white (255, 255, 255) #ffffff 16777215 127.833333 357902 253 581 255 33.597333 33.597333 32.805334
43 StainlessSteel 860.058381 288.366525 288.366525 283.325331 white (255, 255, 255) #ffffff 16777215 127.833333 601745 253 458 108 33.528715 33.528715 32.942570
In [32]:
# Adjust values to plot
df_plot.Sum_Ch0        = df_plot.Sum_Ch0 + 500 # to have diference lines during plot
df_plot.Sum_Ch1        = df_plot.Sum_Ch1 + 1000
df_plot.Sum_Ch2        = df_plot.Sum_Ch2 + 1500
df_plot.All_Bands      = df_plot.All_Bands + 2000

df_plot.Color_dec      = df_plot.Color_dec / 1000
df_plot.Color_dec      = df_plot.Color_dec - 10000
df_plot.Med_Extrems    = df_plot.Med_Extrems + 500
df_plot.Max_Histog     = df_plot.Max_Histog / 1000
df_plot.Idx_Max_Histog = df_plot.Idx_Max_Histog + 1000
df_plot.Min_Histog     = df_plot.Min_Histog * 100
df_plot.Idx_Min_Histog = df_plot.Idx_Min_Histog * 10

df_plot.perc_R = df_plot.perc_R + 1000
df_plot.perc_G = df_plot.perc_G + 1100
df_plot.perc_B = df_plot.perc_B + 1200

df_plot
Out[32]:
Material All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 Color Color_RGB Color_hex Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
0 Aluminum 2658.137536 720.999978 1220.999978 1716.137580 white (255, 255, 255) #ffffff 6777.215 627.833333 237.292 1011 54300 1090 1033.579604 1133.579604 1232.840792
1 Aluminum 2693.024169 732.705276 1232.705276 1727.613617 white (255, 255, 255) #ffffff 6777.215 627.833333 280.312 1252 64800 1290 1033.578234 1133.578234 1232.843532
2 Aluminum 2696.532319 733.779842 1233.779842 1728.972635 white (255, 255, 255) #ffffff 6777.215 627.833333 248.402 1008 81900 940 1033.563388 1133.563388 1232.873225
3 Aluminum 2658.137536 720.999978 1220.999978 1716.137580 white (255, 255, 255) #ffffff 6777.215 627.833333 237.292 1011 54300 1090 1033.579604 1133.579604 1232.840792
4 Aluminum 2693.024169 732.705276 1232.705276 1727.613617 white (255, 255, 255) #ffffff 6777.215 627.833333 280.312 1252 64800 1290 1033.578234 1133.578234 1232.843532
5 Aluminum 2696.532319 733.779842 1233.779842 1728.972635 white (255, 255, 255) #ffffff 6777.215 627.833333 248.402 1008 81900 940 1033.563388 1133.563388 1232.873225
6 Brass 2562.098115 689.033946 1189.033946 1684.030223 white (255, 255, 255) #ffffff 6777.215 627.833333 217.593 1252 24900 0 1033.630062 1133.630062 1232.739875
7 Brass 2449.396523 651.345791 1151.345791 1646.704941 white (255, 255, 255) #ffffff 6777.215 627.833333 179.424 1019 25200 0 1033.677562 1133.677562 1232.644877
8 Brass 2469.763357 658.316124 1158.316124 1653.131109 white (255, 255, 255) #ffffff 6777.215 627.833333 201.117 1014 31400 2550 1033.701250 1133.701250 1232.597500
9 Brass 2562.098115 689.033946 1189.033946 1684.030223 white (255, 255, 255) #ffffff 6777.215 627.833333 217.593 1252 24900 0 1033.630062 1133.630062 1232.739875
10 Brass 2449.396523 651.345791 1151.345791 1646.704941 white (255, 255, 255) #ffffff 6777.215 627.833333 179.424 1019 25200 0 1033.677562 1133.677562 1232.644877
11 Brass 2469.763357 658.316124 1158.316124 1653.131109 white (255, 255, 255) #ffffff 6777.215 627.833333 201.117 1014 31400 2550 1033.701250 1133.701250 1232.597500
12 CopperWire 2521.051218 675.360057 1175.360057 1670.331104 white (255, 255, 255) #ffffff 6777.215 627.833333 219.734 1252 6500 2550 1033.655052 1133.655052 1232.689897
13 CopperWire 2634.394685 713.195874 1213.195874 1708.002937 white (255, 255, 255) #ffffff 6777.215 627.833333 319.958 1252 20500 1560 1033.606189 1133.606189 1232.787623
14 CopperWire 2481.236521 662.041057 1162.041057 1657.154407 white (255, 255, 255) #ffffff 6777.215 627.833333 139.122 1253 11800 2550 1033.671812 1133.671812 1232.656376
15 CopperWire 2564.848218 689.837464 1189.837464 1685.173290 white (255, 255, 255) #ffffff 6777.215 627.833333 98.434 1051 4100 2550 1033.608580 1133.608580 1232.782840
16 CopperWire 2521.051218 675.360057 1175.360057 1670.331104 white (255, 255, 255) #ffffff 6777.215 627.833333 219.734 1252 6500 2550 1033.655052 1133.655052 1232.689897
17 CopperWire 2634.394685 713.195874 1213.195874 1708.002937 white (255, 255, 255) #ffffff 6777.215 627.833333 319.958 1252 20500 1560 1033.606189 1133.606189 1232.787623
18 CopperWire 2481.236521 662.041057 1162.041057 1657.154407 white (255, 255, 255) #ffffff 6777.215 627.833333 139.122 1253 11800 2550 1033.671812 1133.671812 1232.656376
19 CopperWire 2564.848218 689.837464 1189.837464 1685.173290 white (255, 255, 255) #ffffff 6777.215 627.833333 98.434 1051 4100 2550 1033.608580 1133.608580 1232.782840
20 Copper 2447.139193 650.632053 1150.632053 1645.875087 white (255, 255, 255) #ffffff 6777.215 627.833333 176.926 1015 28900 2550 1033.687956 1133.687956 1232.624089
21 Copper 2588.109624 697.635200 1197.635200 1692.839224 white (255, 255, 255) #ffffff 6777.215 627.833333 179.730 1253 55200 0 1033.605163 1133.605163 1232.789673
22 Copper 2447.139193 650.632053 1150.632053 1645.875087 white (255, 255, 255) #ffffff 6777.215 627.833333 176.926 1015 28900 2550 1033.687956 1133.687956 1232.624089
23 Copper 2588.109624 697.635200 1197.635200 1692.839224 white (255, 255, 255) #ffffff 6777.215 627.833333 179.730 1253 55200 0 1033.605163 1133.605163 1232.789673
24 Iron 2641.517597 715.555740 1215.555740 1710.406117 white (255, 255, 255) #ffffff 6777.215 627.833333 295.179 1252 40700 0 1033.600908 1133.600908 1232.798183
25 Iron 2641.517597 715.555740 1215.555740 1710.406117 white (255, 255, 255) #ffffff 6777.215 627.833333 295.179 1252 40700 0 1033.600908 1133.600908 1232.798183
26 Iron 2601.674947 702.340947 1202.340947 1696.993053 white (255, 255, 255) #ffffff 6777.215 627.833333 326.204 1252 30300 2550 1033.629611 1133.629611 1232.740777
27 Iron 2575.482113 693.527250 1193.527250 1688.427613 white (255, 255, 255) #ffffff 6777.215 627.833333 297.351 1252 41300 2550 1033.628717 1133.628717 1232.742566
28 PaintedIron 2495.478663 666.811124 1166.811124 1661.856415 white (255, 255, 255) #ffffff 6777.215 627.833333 221.927 1253 6500 1760 1033.666661 1133.666661 1232.666677
29 PaintedIron 2606.481866 703.824174 1203.824174 1698.833518 white (255, 255, 255) #ffffff 6777.215 627.833333 438.426 1253 13200 1200 1033.607629 1133.607629 1232.784742
30 PaintedIron 2573.568470 692.841021 1192.841021 1687.886428 white (255, 255, 255) #ffffff 6777.215 627.833333 374.673 1253 18300 1170 1033.621273 1133.621273 1232.757454
31 PaintedIron 2495.478663 666.811124 1166.811124 1661.856415 white (255, 255, 255) #ffffff 6777.215 627.833333 221.927 1253 6500 1760 1033.666661 1133.666661 1232.666677
32 PaintedIron 2606.481866 703.824174 1203.824174 1698.833518 white (255, 255, 255) #ffffff 6777.215 627.833333 438.426 1253 13200 1200 1033.607629 1133.607629 1232.784742
33 PaintedIron 2573.568470 692.841021 1192.841021 1687.886428 white (255, 255, 255) #ffffff 6777.215 627.833333 374.673 1253 18300 1170 1033.621273 1133.621273 1232.757454
34 PaintedIron 2606.481866 703.824174 1203.824174 1698.833518 white (255, 255, 255) #ffffff 6777.215 627.833333 438.426 1253 13200 1200 1033.607629 1133.607629 1232.784742
35 StainlessSteel 2654.906666 719.931246 1219.931246 1715.044174 white (255, 255, 255) #ffffff 6777.215 627.833333 366.933 1253 38600 2550 1033.582075 1133.582075 1232.835851
36 StainlessSteel 2573.675257 692.847695 1192.847695 1687.979867 white (255, 255, 255) #ffffff 6777.215 627.833333 356.158 1253 46000 2370 1033.616178 1133.616178 1232.767644
37 StainlessSteel 2654.906666 719.931246 1219.931246 1715.044174 white (255, 255, 255) #ffffff 6777.215 627.833333 366.933 1253 38600 2550 1033.582075 1133.582075 1232.835851
38 StainlessSteel 2573.675257 692.847695 1192.847695 1687.979867 white (255, 255, 255) #ffffff 6777.215 627.833333 356.158 1253 46000 2370 1033.616178 1133.616178 1232.767644
39 StainlessSteel 2638.936045 714.726624 1214.726624 1709.482797 white (255, 255, 255) #ffffff 6777.215 627.833333 370.886 1252 46100 2550 1033.606904 1133.606904 1232.786192
40 StainlessSteel 2731.365569 745.627645 1245.627645 1740.110279 white (255, 255, 255) #ffffff 6777.215 627.833333 497.534 1252 23600 2550 1033.584797 1133.584797 1232.830405
41 StainlessSteel 2595.649206 700.158029 1200.158029 1695.333148 white (255, 255, 255) #ffffff 6777.215 627.833333 326.367 1253 67300 1390 1033.603340 1133.603340 1232.793320
42 StainlessSteel 2611.667734 705.504045 1205.504045 1700.659644 white (255, 255, 255) #ffffff 6777.215 627.833333 357.902 1253 58100 2550 1033.597333 1133.597333 1232.805334
43 StainlessSteel 2860.058381 788.366525 1288.366525 1783.325331 white (255, 255, 255) #ffffff 6777.215 627.833333 601.745 1253 45800 1080 1033.528715 1133.528715 1232.942570
In [33]:
df_plot.plot(y=["All_Bands","Sum_Ch0","Sum_Ch1", "Sum_Ch2","Color_dec","Med_Extrems"],
             figsize=(12,6), grid=True )

# Obtain legend (xticks) for X axis
loc_Array_sum = np.arange(len(df_plot.index))
# Position of X labels
xtick_loc = list(loc_Array_sum)  
# Name of x labels
xticks = list(df_plot.Material)
#-------

#plt.plot(df_plot.Array_sum)
plt.title('IMAGE WITH ALL CHANNELS',fontsize=20)
plt.ylabel('Sum of image matrix',fontsize=18)
plt.xticks(xtick_loc, df_plot.Material, rotation=90)
plt.xlabel('Material',fontsize=18)
plt.legend(loc='upper right', ncol=3, fancybox=True, shadow=True)
plt.savefig(folder+"_Line Graph all channels information.png")
plt.show()
In [34]:
df_plot.perc_R = df_plot.perc_R - 1000
df_plot.perc_G = df_plot.perc_G - 1100
df_plot.perc_B = df_plot.perc_B - 1200
In [35]:
df_plot.plot(y=["perc_R","perc_G","perc_B"],
             figsize=(12,6), grid=True )

# Obtain legend (xticks) for X axis
loc_Array_sum = np.arange(len(df_plot.index))
# Position of X labels
xtick_loc = list(loc_Array_sum)  
# Name of x labels
xticks = list(df_plot.Material)
#-------

#plt.plot(df_plot.Array_sum)
plt.title('Percentage R,G,B',fontsize=20)
plt.ylabel('Percentages R,G,B',fontsize=18)
plt.xticks(xtick_loc, df_plot.Material, rotation=90)
plt.xlabel('Material',fontsize=18)
plt.legend(loc='upper right', ncol=3, fancybox=True, shadow=True)
plt.savefig(folder+"_Line Graph Percentage RGB.png")
plt.show()
In [36]:
# Create pivot table
df_plot1 = df_plot.groupby('Material')['All_Bands', 'Sum_Ch0','Sum_Ch1','Sum_Ch2','Color_dec',
                                       'Med_Extrems', 'Max_Histog', 'Idx_Max_Histog','Min_Histog',
                                       'Idx_Min_Histog','perc_R','perc_G','perc_B'].mean()
df_plot1
Out[36]:
All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
Material
Aluminum 2682.564675 729.161699 1229.161699 1724.241277 6777.215 627.833333 255.335333 1090.333333 67000.000000 1106.666667 33.573742 33.573742 32.852516
Brass 2493.752665 666.231954 1166.231954 1661.288758 6777.215 627.833333 199.378000 1095.000000 27166.666667 850.000000 33.669625 33.669625 32.660751
Copper 2517.624408 674.133626 1174.133626 1669.357156 6777.215 627.833333 178.328000 1134.000000 42050.000000 1275.000000 33.646560 33.646560 32.706881
CopperWire 2550.382660 685.108613 1185.108613 1680.165434 6777.215 627.833333 194.312000 1202.000000 10725.000000 2302.500000 33.635408 33.635408 32.729184
Iron 2615.048063 706.744919 1206.744919 1701.558225 6777.215 627.833333 303.478250 1252.000000 38250.000000 1275.000000 33.615036 33.615036 32.769927
PaintedIron 2565.362838 690.110973 1190.110973 1685.140891 6777.215 627.833333 358.354000 1253.000000 12742.857143 1351.428571 33.628394 33.628394 32.743213
StainlessSteel 2654.982309 719.993417 1219.993417 1714.995476 6777.215 627.833333 400.068444 1252.777778 45566.666667 2217.777778 33.590844 33.590844 32.818312
In [37]:
color = ['red','blue','green','orange','cyan','black','yellow']
In [38]:
df_All_Bands = pd.DataFrame(df_plot1.All_Bands)

df_All_Bands.plot(kind='bar', y=0, color=color, legend=False, rot=0, figsize=(10,5))
plt.title('IMAGE WITH ALL CHANNELS',fontsize=20)
plt.grid(True)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Sum of image matrix',fontsize=18)
plt.savefig(folder+"_Sum of image matrix.png")
plt.show()
In [39]:
df_Max_Histog = pd.DataFrame(df_plot1.Max_Histog)

df_Max_Histog.plot(kind='bar', y=0, color=color, legend=False, rot=0, figsize=(10,5))
plt.title('IMAGE WITH ALL CHANNELS-Max_Histog',fontsize=15)
plt.grid(True)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Max_Histog',fontsize=18)
plt.savefig(folder+"_Max_Histog.png")
plt.show()
In [40]:
df_perc = pd.DataFrame(df_plot1.perc_R)

df_perc.plot(kind='bar', y=0, color=color, legend=False, rot=0, figsize=(10,5))
plt.title('IMAGE WITH CHANNELS-Percentage R',fontsize=15)
plt.grid(True)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Idx_Max_Histog',fontsize=18)
plt.show()
In [41]:
loc_Array_sum = np.arange(len(df_plot1.index))+0.1 # Offsetting the tick-label location

loc_r = np.arange(len(df_plot1.index))-0.1 # Offsetting the tick-label location
loc_g = np.arange(len(df_plot1.index))-0.0 # Offsetting the tick-label location
loc_b = np.arange(len(df_plot1.index))+0.1 # Offsetting the tick-label location

#xtick_loc = list(loc_Array_sum) + list(loc_r) + list(loc_g) + list(loc_b)
#xticks = list(selected.keys())+ list(rejected.keys())
colors = ['darkred','red','green','blue','orange','cyan','black','yellow']
plt.figure(figsize=(12,5))

plt.bar(loc_r, df_plot1.perc_R, color='red', width=0.1, label='Band R')
plt.bar(loc_g, df_plot1.perc_G, color='green', width=0.1,label='Band G')
plt.bar(loc_b, df_plot1.perc_B, color='blue', width=0.1,label='Band B')

plt.title('Percentage R,G,B',fontsize=20)
plt.xlabel('Material',fontsize=18)
plt.ylabel('RGB',fontsize=18)
plt.grid(True)
plt.xticks(xtick_loc, xticks, rotation=90)
plt.legend(bbox_to_anchor=(.8,0.8),\
    bbox_transform=plt.gcf().transFigure)
plt.savefig(folder+"_Bar Diagram_perc_RGB.png")
plt.show()
In [42]:
df_Idx_Min_Histog = pd.DataFrame(df_plot1.Idx_Min_Histog)

df_Idx_Min_Histog.plot(kind='bar', y=0, color=color, legend=False, rot=0, figsize=(10,5))
plt.title('IMAGE WITH ALL CHANNELS-Idx_Min_Histog',fontsize=15)
plt.grid(True)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Idx_Min_Histog',fontsize=18)
plt.savefig(folder+"_Idx_Min_Histogram.png")
plt.show()
In [43]:
df_Idx_Min_Histog = pd.DataFrame(df_plot1.Idx_Min_Histog)

df_Idx_Min_Histog.plot(kind='bar', y=0, color=color, legend=False, rot=0, figsize=(10,5))
plt.title('IMAGE WITH ALL CHANNELS-Idx_Min_Histog',fontsize=15)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Idx_Min_Histog',fontsize=18)
plt.show()
In [44]:
loc_Array_sum = np.arange(len(df_plot1.index))
xtick_loc = list(loc_Array_sum)  
xticks = list(df_plot1.index)

df_plot1.plot( y=["All_Bands","Sum_Ch0","Sum_Ch1", "Sum_Ch2","Color_dec","Med_Extrems"],
              figsize=(12,6), grid=True )
plt.xticks(xtick_loc, df_plot1.index, rotation=0)
plt.title('IMAGE WITH ALL CHANNELS',fontsize=20)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Sum of image matrix',fontsize=18)
plt.legend(loc='upper right', ncol=1, fancybox=True, shadow=True,bbox_to_anchor=(1.1, 1.05))
plt.savefig(folder+"_resume all channels.png")
plt.show()
In [45]:
df_plot1
Out[45]:
All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
Material
Aluminum 2682.564675 729.161699 1229.161699 1724.241277 6777.215 627.833333 255.335333 1090.333333 67000.000000 1106.666667 33.573742 33.573742 32.852516
Brass 2493.752665 666.231954 1166.231954 1661.288758 6777.215 627.833333 199.378000 1095.000000 27166.666667 850.000000 33.669625 33.669625 32.660751
Copper 2517.624408 674.133626 1174.133626 1669.357156 6777.215 627.833333 178.328000 1134.000000 42050.000000 1275.000000 33.646560 33.646560 32.706881
CopperWire 2550.382660 685.108613 1185.108613 1680.165434 6777.215 627.833333 194.312000 1202.000000 10725.000000 2302.500000 33.635408 33.635408 32.729184
Iron 2615.048063 706.744919 1206.744919 1701.558225 6777.215 627.833333 303.478250 1252.000000 38250.000000 1275.000000 33.615036 33.615036 32.769927
PaintedIron 2565.362838 690.110973 1190.110973 1685.140891 6777.215 627.833333 358.354000 1253.000000 12742.857143 1351.428571 33.628394 33.628394 32.743213
StainlessSteel 2654.982309 719.993417 1219.993417 1714.995476 6777.215 627.833333 400.068444 1252.777778 45566.666667 2217.777778 33.590844 33.590844 32.818312
In [46]:
# Copy dataframe to arrange values
df_plot2 =  df_plot1.copy() 
df_plot2
Out[46]:
All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
Material
Aluminum 2682.564675 729.161699 1229.161699 1724.241277 6777.215 627.833333 255.335333 1090.333333 67000.000000 1106.666667 33.573742 33.573742 32.852516
Brass 2493.752665 666.231954 1166.231954 1661.288758 6777.215 627.833333 199.378000 1095.000000 27166.666667 850.000000 33.669625 33.669625 32.660751
Copper 2517.624408 674.133626 1174.133626 1669.357156 6777.215 627.833333 178.328000 1134.000000 42050.000000 1275.000000 33.646560 33.646560 32.706881
CopperWire 2550.382660 685.108613 1185.108613 1680.165434 6777.215 627.833333 194.312000 1202.000000 10725.000000 2302.500000 33.635408 33.635408 32.729184
Iron 2615.048063 706.744919 1206.744919 1701.558225 6777.215 627.833333 303.478250 1252.000000 38250.000000 1275.000000 33.615036 33.615036 32.769927
PaintedIron 2565.362838 690.110973 1190.110973 1685.140891 6777.215 627.833333 358.354000 1253.000000 12742.857143 1351.428571 33.628394 33.628394 32.743213
StainlessSteel 2654.982309 719.993417 1219.993417 1714.995476 6777.215 627.833333 400.068444 1252.777778 45566.666667 2217.777778 33.590844 33.590844 32.818312
In [47]:
df_plot2.Med_Extrems    = df_plot2.Med_Extrems + 2000
df_plot2.Max_Histog     = df_plot2.Max_Histog  + 1500
df_plot2.Idx_Max_Histog = df_plot2.Idx_Max_Histog + 1000
df_plot2.Min_Histog     = df_plot2.Min_Histog + 500
df_plot2.Idx_Min_Histog = df_plot2.Idx_Min_Histog - 1000
df_plot2.head()
Out[47]:
All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
Material
Aluminum 2682.564675 729.161699 1229.161699 1724.241277 6777.215 2627.833333 1755.335333 2090.333333 67500.000000 106.666667 33.573742 33.573742 32.852516
Brass 2493.752665 666.231954 1166.231954 1661.288758 6777.215 2627.833333 1699.378000 2095.000000 27666.666667 -150.000000 33.669625 33.669625 32.660751
Copper 2517.624408 674.133626 1174.133626 1669.357156 6777.215 2627.833333 1678.328000 2134.000000 42550.000000 275.000000 33.646560 33.646560 32.706881
CopperWire 2550.382660 685.108613 1185.108613 1680.165434 6777.215 2627.833333 1694.312000 2202.000000 11225.000000 1302.500000 33.635408 33.635408 32.729184
Iron 2615.048063 706.744919 1206.744919 1701.558225 6777.215 2627.833333 1803.478250 2252.000000 38750.000000 275.000000 33.615036 33.615036 32.769927
In [48]:
loc_Array_sum = np.arange(len(df_plot2.index))
xtick_loc = list(loc_Array_sum)  
xticks = list(df_plot1.index)

df_plot2.plot( y=['Color_dec','Med_Extrems', 'Max_Histog', 'Idx_Max_Histog',
                  'Min_Histog','Idx_Min_Histog','perc_R','perc_G','perc_B'],figsize=(12,6), grid=True )
plt.xticks(xtick_loc, df_plot2.index, rotation=0)
plt.title('IMAGE WITH ALL CHANNELS - Color and Histogram',fontsize=18)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Average of Color and Histogram',fontsize=18)
plt.legend(loc='upper right', ncol=1, fancybox=True, shadow=True,bbox_to_anchor=(1.1, 1.05))
plt.savefig(folder+"_color_and_histogram.png")
plt.show()
In [49]:
# Create Xlabels
loc_Array_sum = np.arange(len(df_plot1.index))+0.0 # Offsetting the tick-label location
loc_r = np.arange(len(df_plot1.index))+0.1 # Offsetting the tick-label location
loc_g = np.arange(len(df_plot1.index))-0.0 # Offsetting the tick-label location
loc_b = np.arange(len(df_plot1.index))-0.1 # Offsetting the tick-label location

xtick_loc = list(loc_g)  
xticks = list(df_plot1.index)
In [50]:
# Plot
In [51]:
# Plot  Bar Graph
#df_plot1.plot(kind='bar', figsize=(12,5), grid=True, color='darkred',fontsize=18)
loc_Array_sum = np.arange(len(df_plot1.index))+0.0 # Offsetting the tick-label location
loc_b = np.arange(len(df_plot1.index))+0.1 # Offsetting the tick-label location
loc_g = np.arange(len(df_plot1.index))-0.0 # Offsetting the tick-label location
loc_r = np.arange(len(df_plot1.index))-0.1 # Offsetting the tick-label location

#xtick_loc = list(loc_Array_sum) + list(loc_r) + list(loc_g) + list(loc_b)
#xticks = list(selected.keys())+ list(rejected.keys())
colors = ['darkred','red','green','blue','orange','cyan','black','yellow']
plt.figure(figsize=(12,5))

plt.bar(loc_Array_sum, df_plot1.All_Bands, color=colors[0], width=0.1, label='All_Bands')
plt.bar(loc_r, df_plot1.Sum_Ch0, color=colors[1], width=0.1,label='Band R')
plt.bar(loc_g, df_plot1.Sum_Ch1, color=colors[2], width=0.1,label='Band G')
plt.bar(loc_b, df_plot1.Sum_Ch2, color=colors[3], width=0.1,label='Band B')

plt.title('IMAGE WITH ALL CHANNELS',fontsize=20)
plt.grid(True)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Sum of image matrix',fontsize=18)
plt.xticks(xtick_loc, xticks, rotation=0)
plt.legend(bbox_to_anchor=(.8,0.8),\
    bbox_transform=plt.gcf().transFigure)
plt.savefig(folder+"_all bands.png")
plt.show()
In [52]:
plt.figure(1)
plt.figure(figsize=(17, 4))
plt.tight_layout()
plt.subplot(231)
plt.title('IMAGE CHANNEL 0')
plt.xticks(rotation=45)
plt.grid(True)
plt.plot(df_plot1.Sum_Ch0, 'k--')

plt.subplot(232)
plt.title('IMAGE CHANNEL 1')
plt.xticks(rotation=45)
plt.grid(True)
plt.plot(df_plot1.Sum_Ch1,  'r--')

plt.subplot(233)
plt.title('IMAGE CHANNEL 2')
plt.xticks(rotation=45)
plt.plot(df_plot1.Sum_Ch2,  'g--')
plt.grid(True)
plt.suptitle('Sum Matrix of channels',fontsize=20,y=1.08)
#plt.tight_layout()
plt.subplots_adjust(top=0.8)
plt.savefig(folder+"_Sum Matrix of channels.png")
plt.show()
<Figure size 432x288 with 0 Axes>
In [53]:
# Pèrcentage of R,G,B
plt.figure(1)
plt.figure(figsize=(17, 4))
plt.tight_layout()
plt.subplot(231)
plt.title('IMAGE CHANNEL R')
plt.xticks(rotation=45)
plt.grid(True)
plt.plot(df_plot1.perc_R, 'r--')

plt.subplot(232)
plt.title('IMAGE CHANNEL G')
plt.xticks(rotation=45)
plt.grid(True)
plt.plot(df_plot1.perc_G,  'g--')

plt.subplot(233)
plt.title('IMAGE CHANNEL B')
plt.xticks(rotation=45)
plt.plot(df_plot1.perc_B,  'b--')
plt.grid(True)

plt.suptitle('Percentage of R,G,B',fontsize=20,y=1.08)
#plt.tight_layout()
plt.subplots_adjust(top=0.8)
plt.savefig(folder+'_Percentage_RGB.png', bbox_inches='tight', pad_inches=0.0)
plt.show()
<Figure size 432x288 with 0 Axes>
In [54]:
# Plot channel based
plt.plot(df_plot1.All_Bands)
plt.title('IMAGE WITH ALL CHANNELS',fontsize=20)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Sum of image matrix',fontsize=18)
plt.xticks(rotation=45)
plt.grid(True)
plt.savefig(folder+'_Sum_all_channels.png', bbox_inches='tight', pad_inches=0.0)
plt.show()
In [55]:
# Plot based on color
plt.plot(df_plot1.Color_dec/1000)
plt.title('IMAGE WITH COLORS BASED',fontsize=20)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Average of color image',fontsize=18)
plt.xticks(rotation=45)
plt.grid(True)
plt.show()
In [56]:
# Plot based on Extrems of the Bands
plt.plot(df_plot1.Med_Extrems/10)
plt.title('IMAGE WITH EXTREMS BANDS BASED',fontsize=20)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Average of Extrems image',fontsize=18)
plt.xticks(rotation=45)
plt.grid(True)
plt.savefig(folder+'_color_based.png', bbox_inches='tight', pad_inches=0.0)
plt.show()

Create Histograms

https://www.cambridgeincolour.com/pt-br/tutoriais/histograms1.htm

https://www.cambridgeincolour.com/pt-br/tutoriais/image-noise.htm

http://www2.ic.uff.br/~aconci/aula-2-2015-AI.pdf

https://www.ic.unicamp.br/~ra144681/misc/files/ApostilaProcDeImagesParteI.pdf

histograma, também conhecido como distribuição de frequências ou diagrama das frequências, é a representação gráfica, em colunas (retângulos), de um conjunto de dados previamente tabulado e dividido em classes uniformes.

Histogramas:

O histograma de uma imagem cinza e uma funcao discreta h(l) (vetor) que produz o numero de ocorrencias de cada nıvel de cinza na imagem. O histograma normalizado h(l)/|DI | representa a distribuicao de probabilidade dos valores dos pixels.

Imagens claras possuem histogramas com altas concentracoes de pixels de alto brilho. Imagens escuras possuem histogramas com altas concentracoes de pixels de baixo brilho. O contraste maior esta associado a um grau maior de dispersao do histograma.

No caso de imagens multiespectrais, cada banda e´ requantizada em um certo numero de intervalos, de forma que o espaco de caracterısticas Zk ´e dividido em hipercubos (bins do histograma). A contagem de cores em cada bin ´e usada no c´alculo do histograma. Assim, para cada bin, precisamos analisar os n´ıveis de cinza das 3 bandas da imagem colorida (RGB).

Entendendo Histogramas:

O histograma mostra a frequencia dos valores de brilho da imagem, ou seja, a quantidade de luz presente na imagem.

In [57]:
list_of_images
Out[57]:
['Aluminum_1.tif',
 'Aluminum_2.tif',
 'Aluminum_3.tif',
 'Aluminum_4.tif',
 'Aluminum_5.tif',
 'Aluminum_6.tif',
 'Brass_1.tif',
 'Brass_2.tif',
 'Brass_3.tif',
 'Brass_4.tif',
 'Brass_5.tif',
 'Brass_6.tif',
 'CopperWire_1.tif',
 'CopperWire_2.tif',
 'CopperWire_3.tif',
 'CopperWire_4.tif',
 'CopperWire_5.tif',
 'CopperWire_6.tif',
 'CopperWire_7.tif',
 'CopperWire_8.tif',
 'Copper_1.tif',
 'Copper_2.tif',
 'Copper_3.tif',
 'Copper_4.tif',
 'Iron_1.tif',
 'Iron_2.tif',
 'Iron_3.tif',
 'Iron_4.tif',
 'PaintedIron_1.tif',
 'PaintedIron_2.tif',
 'PaintedIron_3.tif',
 'PaintedIron_4.tif',
 'PaintedIron_5.tif',
 'PaintedIron_6.tif',
 'PaintedIron_7.tif',
 'StainlessSteel_1.tif',
 'StainlessSteel_2.tif',
 'StainlessSteel_3.tif',
 'StainlessSteel_4.tif',
 'StainlessSteel_5.tif',
 'StainlessSteel_6.tif',
 'StainlessSteel_7.tif',
 'StainlessSteel_8.tif',
 'StainlessSteel_9.tif']
In [58]:
# Delete values from list - Bad image names
def remove_values_from_list(list_values, mask):
    list_new = list()
    for list_value in list_values:
        if(mask not in list_value):
            print(list_value)
            list_new.append(list_value)
    return list_new 
In [59]:
# Remove from list names with 'MASK'
new_list = remove_values_from_list(list_of_images, 'MASK')
Aluminum_1.tif
Aluminum_2.tif
Aluminum_3.tif
Aluminum_4.tif
Aluminum_5.tif
Aluminum_6.tif
Brass_1.tif
Brass_2.tif
Brass_3.tif
Brass_4.tif
Brass_5.tif
Brass_6.tif
CopperWire_1.tif
CopperWire_2.tif
CopperWire_3.tif
CopperWire_4.tif
CopperWire_5.tif
CopperWire_6.tif
CopperWire_7.tif
CopperWire_8.tif
Copper_1.tif
Copper_2.tif
Copper_3.tif
Copper_4.tif
Iron_1.tif
Iron_2.tif
Iron_3.tif
Iron_4.tif
PaintedIron_1.tif
PaintedIron_2.tif
PaintedIron_3.tif
PaintedIron_4.tif
PaintedIron_5.tif
PaintedIron_6.tif
PaintedIron_7.tif
StainlessSteel_1.tif
StainlessSteel_2.tif
StainlessSteel_3.tif
StainlessSteel_4.tif
StainlessSteel_5.tif
StainlessSteel_6.tif
StainlessSteel_7.tif
StainlessSteel_8.tif
StainlessSteel_9.tif
In [60]:
# Remove from list names with 'Enh'
new_list = remove_values_from_list(new_list, 'Enh')
Aluminum_1.tif
Aluminum_2.tif
Aluminum_3.tif
Aluminum_4.tif
Aluminum_5.tif
Aluminum_6.tif
Brass_1.tif
Brass_2.tif
Brass_3.tif
Brass_4.tif
Brass_5.tif
Brass_6.tif
CopperWire_1.tif
CopperWire_2.tif
CopperWire_3.tif
CopperWire_4.tif
CopperWire_5.tif
CopperWire_6.tif
CopperWire_7.tif
CopperWire_8.tif
Copper_1.tif
Copper_2.tif
Copper_3.tif
Copper_4.tif
Iron_1.tif
Iron_2.tif
Iron_3.tif
Iron_4.tif
PaintedIron_1.tif
PaintedIron_2.tif
PaintedIron_3.tif
PaintedIron_4.tif
PaintedIron_5.tif
PaintedIron_6.tif
PaintedIron_7.tif
StainlessSteel_1.tif
StainlessSteel_2.tif
StainlessSteel_3.tif
StainlessSteel_4.tif
StainlessSteel_5.tif
StainlessSteel_6.tif
StainlessSteel_7.tif
StainlessSteel_8.tif
StainlessSteel_9.tif
In [61]:
list_of_images = new_list
In [62]:
path = mypath + '/' + folder + '/'
path
Out[62]:
'C:\\Users\\manuel.robalinho\\Google Drive\\UPT_Portucalense\\Trabalho final\\Classificacao_Sucata\\Jupyter_Notebook/imagedata06/'
In [63]:
# HISTOGRAMS
# Print Histograms for all folder images
# list_of_images has all the name files

for x in list_of_images:
    print('Cv2 Histogram for File:', x)
    print_cv_hist(path, x)
Cv2 Histogram for File: Aluminum_1.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_1.tif
Cv2 Histogram for File: Aluminum_2.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_2.tif
Cv2 Histogram for File: Aluminum_3.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_3.tif
Cv2 Histogram for File: Aluminum_4.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_4.tif
Cv2 Histogram for File: Aluminum_5.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_5.tif
Cv2 Histogram for File: Aluminum_6.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_6.tif
Cv2 Histogram for File: Brass_1.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_1.tif
Cv2 Histogram for File: Brass_2.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_2.tif
Cv2 Histogram for File: Brass_3.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_3.tif
Cv2 Histogram for File: Brass_4.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_4.tif
Cv2 Histogram for File: Brass_5.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_5.tif
Cv2 Histogram for File: Brass_6.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_6.tif
Cv2 Histogram for File: CopperWire_1.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_1.tif
Cv2 Histogram for File: CopperWire_2.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_2.tif
Cv2 Histogram for File: CopperWire_3.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_3.tif
Cv2 Histogram for File: CopperWire_4.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_4.tif
Cv2 Histogram for File: CopperWire_5.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_5.tif
Cv2 Histogram for File: CopperWire_6.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_6.tif
Cv2 Histogram for File: CopperWire_7.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_7.tif
Cv2 Histogram for File: CopperWire_8.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_8.tif
Cv2 Histogram for File: Copper_1.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Copper_1.tif
Cv2 Histogram for File: Copper_2.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Copper_2.tif
Cv2 Histogram for File: Copper_3.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Copper_3.tif
Cv2 Histogram for File: Copper_4.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Copper_4.tif
Cv2 Histogram for File: Iron_1.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Iron_1.tif
Cv2 Histogram for File: Iron_2.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Iron_2.tif
Cv2 Histogram for File: Iron_3.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Iron_3.tif
Cv2 Histogram for File: Iron_4.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Iron_4.tif
Cv2 Histogram for File: PaintedIron_1.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_1.tif
Cv2 Histogram for File: PaintedIron_2.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_2.tif
Cv2 Histogram for File: PaintedIron_3.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_3.tif
Cv2 Histogram for File: PaintedIron_4.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_4.tif
Cv2 Histogram for File: PaintedIron_5.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_5.tif
Cv2 Histogram for File: PaintedIron_6.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_6.tif
Cv2 Histogram for File: PaintedIron_7.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_7.tif
Cv2 Histogram for File: StainlessSteel_1.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_1.tif
Cv2 Histogram for File: StainlessSteel_2.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_2.tif
Cv2 Histogram for File: StainlessSteel_3.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_3.tif
Cv2 Histogram for File: StainlessSteel_4.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_4.tif
Cv2 Histogram for File: StainlessSteel_5.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_5.tif
Cv2 Histogram for File: StainlessSteel_6.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_6.tif
Cv2 Histogram for File: StainlessSteel_7.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_7.tif
Cv2 Histogram for File: StainlessSteel_8.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_8.tif
Cv2 Histogram for File: StainlessSteel_9.tif
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_9.tif
In [68]:
# HISTOGRAMS
# Print Histograms for all folder images
# list_of_images has all the name files

for x in list_of_images:
    print('Matplot Histogram for File:', x)
    print_matplot_hist(path, x)
Matplot Histogram for File: Aluminum_1.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_1.tif
Matplot Histogram for File: Aluminum_2.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_2.tif
Matplot Histogram for File: Aluminum_3.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_3.tif
Matplot Histogram for File: Aluminum_4.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_4.tif
Matplot Histogram for File: Aluminum_5.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_5.tif
Matplot Histogram for File: Aluminum_6.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Aluminum_6.tif
Matplot Histogram for File: Brass_1.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_1.tif
Matplot Histogram for File: Brass_2.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_2.tif
Matplot Histogram for File: Brass_3.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_3.tif
Matplot Histogram for File: Brass_4.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_4.tif
Matplot Histogram for File: Brass_5.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_5.tif
Matplot Histogram for File: Brass_6.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Brass_6.tif
Matplot Histogram for File: CopperWire_1.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_1.tif
Matplot Histogram for File: CopperWire_2.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_2.tif
Matplot Histogram for File: CopperWire_3.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_3.tif
Matplot Histogram for File: CopperWire_4.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_4.tif
Matplot Histogram for File: CopperWire_5.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_5.tif
Matplot Histogram for File: CopperWire_6.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_6.tif
Matplot Histogram for File: CopperWire_7.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_7.tif
Matplot Histogram for File: CopperWire_8.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/CopperWire_8.tif
Matplot Histogram for File: Copper_1.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Copper_1.tif
Matplot Histogram for File: Copper_2.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Copper_2.tif
Matplot Histogram for File: Copper_3.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Copper_3.tif
Matplot Histogram for File: Copper_4.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Copper_4.tif
Matplot Histogram for File: Iron_1.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Iron_1.tif
Matplot Histogram for File: Iron_2.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Iron_2.tif
Matplot Histogram for File: Iron_3.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Iron_3.tif
Matplot Histogram for File: Iron_4.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/Iron_4.tif
Matplot Histogram for File: PaintedIron_1.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_1.tif
Matplot Histogram for File: PaintedIron_2.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_2.tif
Matplot Histogram for File: PaintedIron_3.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_3.tif
Matplot Histogram for File: PaintedIron_4.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_4.tif
Matplot Histogram for File: PaintedIron_5.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_5.tif
Matplot Histogram for File: PaintedIron_6.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_6.tif
Matplot Histogram for File: PaintedIron_7.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/PaintedIron_7.tif
Matplot Histogram for File: StainlessSteel_1.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_1.tif
Matplot Histogram for File: StainlessSteel_2.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_2.tif
Matplot Histogram for File: StainlessSteel_3.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_3.tif
Matplot Histogram for File: StainlessSteel_4.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_4.tif
Matplot Histogram for File: StainlessSteel_5.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_5.tif
Matplot Histogram for File: StainlessSteel_6.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_6.tif
Matplot Histogram for File: StainlessSteel_7.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_7.tif
Matplot Histogram for File: StainlessSteel_8.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_8.tif
Matplot Histogram for File: StainlessSteel_9.tif
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata06/StainlessSteel_9.tif
In [70]:
print('Finished: ',folder )
Finished:  imagedata06
In [ ]: